grip icon indicating copy to clipboard operation
grip copied to clipboard

Add mermaid diagrams support through javascript

Open nikolavp opened this issue 7 months ago • 0 comments

This is the best option that I could find for this. Another way would be to shellout to the mermaid-cli but that seems too heavyweight and needs yet another cli to be installed on the machine. Where the pure javascript library is just portable.

What this does is that it reverses the highlighting done github API and then it runs the mermaid javascript library on top of the pre tags that are created.

The only downside that I can see is that there is now a dependency on the mermaid javascript library in the template. There might be ways to get around this by loading the file dynamically but that seems far too complex for my taste.

This should hopefully fix https://github.com/joeyespo/grip/issues/355

nikolavp avatar Jul 09 '24 21:07 nikolavp