Hello everyone,
As part of the #gothenburg2023 hackaton, I'd like to integrate
Mermaid into
Gitiles.
Mermaid is a javascript program that converts a diagram text representation into an SVG representation. It is already supported by GitHub markdown renderer.
I took a look at
Gitiles source code. Currently,
Gitiles only performs markdown rendering on the server-side, therefore using java.
I think there are multiple (naive?) solutions to add Mermaid to the Markdown rendering:
I think we should pick option 1.
But it seems that Gitiles was designed with browser-side security in mind. Currently, there isn't a single third party javascript module loaded by
Gitiles. So I am not sure that integrating
Mermaid Npm Package would be accepted by the community.
If we think that some people/organizations will refuse to reference a third party javascript library, I suggest 2 ways of implementing option 1: