denoland / deno-gfm

Server-side GitHub Flavored Markdown rendering for Deno
https://jsr.io/@deno/gfm
MIT License
226 stars 37 forks source link

Feature: mermaid support #133

Open TayzenDev opened 1 day ago

TayzenDev commented 1 day ago

Hello!

I developed a mermaid integration to deno-gfm. I think lots of people would like this feature, moreover, it closes the gap between deno-gfm capabilities and the real GFM available in GitHub.

You can see the corresponding documentation here.

This implementation is a bit trickery, but mermaid requires including some JS in your page. I made a backup behavior in case the client doesn't handle JavaScript: a code block is displayed.