Skip to content

Add Mermaid diagram support to Markdown#86

Open
JulienDeveaux wants to merge 1 commit into
chamburr:mainfrom
JulienDeveaux:mermaid-markdown-support
Open

Add Mermaid diagram support to Markdown#86
JulienDeveaux wants to merge 1 commit into
chamburr:mainfrom
JulienDeveaux:mermaid-markdown-support

Conversation

@JulienDeveaux

Copy link
Copy Markdown
Contributor

This PR adds support for Mermaid diagrams in Markdown previews. Fenced code blocks tagged ```mermaid are rendered as SVG diagrams instead of raw text.

The Go side rewrites mermaid blocks via a goldmark and the Swift side conditionally injects the official mermaid v11 bundle (MIT, ~3 MB) into the existing WebView.

@chamburr

Copy link
Copy Markdown
Owner

Thanks for your PRs! I'm hesitant about bundling so much JavaScript to support these files. I'll merge this eventually if I change my mind or if there is sufficient demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants