# Markdown Integration ## Purpose Markdown-to-HTML is the only implemented external file-format integration. This note documents the renderer behavior that is externally visible in generated destination artifacts. ## Dependency Rendering uses `github.com/yuin/goldmark`. The exact dependency version is pinned in `go.mod`; review that file before changing renderer behavior or diagnosing version-specific output changes. ## Renderer behavior `internal/transform/markdown.New` constructs the renderer with `goldmark.New()` and no project-specific extensions or renderer options. The transform supports two output modes: - `sidecar`: reads each source bundle file ending in `.md` and generates an HTML sidecar in the same logical directory. The output path replaces the `.md` suffix with `.html`, so `report.md` produces `report.html`. Non-Markdown source files produce no Markdown outputs. - `index`: renders one selected Markdown source to `index.html` at the destination bundle path. In `index` mode, `transform.markdown_to_html.input` can name the source manifest path to render. If `input` is omitted, the manifest must list exactly one Markdown file. The selected input must be a safe relative source path, must be listed in the source manifest, and must end in `.md`. Raw HTML embedded in Markdown is not passed through by the current renderer behavior. Tests allow Goldmark's disabled-or-escaped raw HTML output forms and reject literal script tags in generated HTML. ## Wrapper Rendered Markdown body HTML is wrapped in a fixed document shell: - `` - `` - UTF-8 `` - empty `