Commit 52d0584
committed
Add Mermaid diagram rendering support
Renders ```mermaid fenced code blocks as interactive SVG diagrams,
matching GitHub's rendering behavior.
- Add mermaid as a dependency
- Custom marked renderer extension intercepts mermaid code blocks and
replaces them with placeholder divs, which are then rendered to SVG
via mermaid.render() after DOMPurify sanitization
- Mermaid theme follows the dark/light mode toggle, re-rendering
diagrams when the theme changes
- Add GitHub-style CSS for mermaid containers (centered, rounded
background, error state styling)
- Include a mermaid flowchart example in the default template1 parent a909688 commit 52d0584
4 files changed
Lines changed: 1436 additions & 99 deletions
0 commit comments