joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 422 forks source link

Feature request: mermaid diagram rendering #355

Open patricksurry opened 2 years ago

patricksurry commented 2 years ago

Presumably a limitation of the /markdown api but grip doesn't render the newly supported mermaid diagrams in markdown. Hoping that gets added at some point 🤞

solomspd commented 1 year ago

I've been poking around this issue, I think a way to conveniently view mermaid diagrams in markdown is great. For anyone wondering, turns out this is explicitly disabled by GitHub

"clients requesting content with embedded Mermaid in a non-JavaScript environment (such as an API request) will see the original Markdown code"

And there does not seem to be a way around this in the API docs

Here's hoping this will be implemented in the grip offline renderer

wwalker commented 8 months ago

It seems that one could have grip call mermaid-cli to generate an svg and include that via a simple <img src....