Motivation
Architecture documentation commonly uses fenced Mermaid blocks. Buzz currently renders these as ordinary code blocks, so projects must commit both the Mermaid source and a generated SVG/PNG to make diagrams viewable.
Proposed solution
Render fenced mermaid code blocks client-side while keeping the Markdown source canonical.
Before implementation, I would like maintainer guidance on the initial scope:
- Repository README and Markdown file views
- Desktop messages
- Canvas support as a later follow-up
The implementation would:
- lazy-load the renderer only when needed
- use strict security settings
- limit diagram input size
- avoid executing raw SVG/HTML
- fall back to the original code block on invalid input
- require no relay, database, API, or event-format changes
Alternatives considered
- Commit both
.mmd and generated .svg files
- Use an external diagram service
- Render diagrams server-side
Committing generated images works but duplicates artifacts. External and server-side rendering add unnecessary infrastructure and reduce offline usability.
Additional context
Duplicate search found no open or closed issue/PR mentioning Mermaid.
Related but not duplicates:
Motivation
Architecture documentation commonly uses fenced Mermaid blocks. Buzz currently renders these as ordinary code blocks, so projects must commit both the Mermaid source and a generated SVG/PNG to make diagrams viewable.
Proposed solution
Render fenced
mermaidcode blocks client-side while keeping the Markdown source canonical.Before implementation, I would like maintainer guidance on the initial scope:
The implementation would:
Alternatives considered
.mmdand generated.svgfilesCommitting generated images works but duplicates artifacts. External and server-side rendering add unnecessary infrastructure and reduce offline usability.
Additional context
Duplicate search found no open or closed issue/PR mentioning Mermaid.
Related but not duplicates: