Summary#
- Add MermaidJS diagram rendering for markdown content (READMEs, issues, PRs)
- Uses goldmark-mermaid with client-side rendering
- Mermaid fenced code blocks are transformed to
<pre class="mermaid">elements - MermaidJS library (~2.5MB) is only loaded on pages that contain mermaid diagrams
- Dark mode support via
prefers-color-schemedetection
Test plan#
-
go test ./appview/pages/markup/— all 16 tests pass, including 3 new mermaid tests - Mermaid blocks produce
<pre class="mermaid">(not syntax-highlighted code blocks) - Regular code blocks still get chroma highlighting
- No regressions in existing tests
- Visual verification on dev server with mermaid diagram in README/issue