Since quite a while now, GitHub has a beautiful support for Mermaid diagrams. Although there is only one way to specify these in Markdown, AsciiDoc is more flexible for the better (one of the reasons why we adopt it for our sources). In a nutshell, following is the difference:
GitHub: +[source,mermaid]+
Asciidoctor with Mermaid: +[mermaid]+
Since we can't postprocess files in GitHub, our source of truth would need to be +[source,mermaid]+ and then format to +[mermaid]+ for HTML and other file generation purposes. For just displaying Mermaid source, only using +[source]+ will be the remedy for a while as long as GitHub does not introduce proper support for +[mermaid]+, which sacrifices source code highlighting but it is not a big deal since Mermaid source is quite easy to read without any highlights.
Since quite a while now, GitHub has a beautiful support for Mermaid diagrams. Although there is only one way to specify these in Markdown, AsciiDoc is more flexible for the better (one of the reasons why we adopt it for our sources). In a nutshell, following is the difference:
+[source,mermaid]+
+[mermaid]+
Since we can't postprocess files in GitHub, our source of truth would need to be
+[source,mermaid]+
and then format to+[mermaid]+
for HTML and other file generation purposes. For just displaying Mermaid source, only using+[source]+
will be the remedy for a while as long as GitHub does not introduce proper support for+[mermaid]+
, which sacrifices source code highlighting but it is not a big deal since Mermaid source is quite easy to read without any highlights.