mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 13:54:54 +00:00
Extension for mermaid syntax #37
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hviid on GitHub (Jul 4, 2016).
I would like to propose an extension to support mermaid diagram syntax.
https://github.com/knsv/mermaid
I would also love to try doing a PR for it. But I think it would require a little guidance.
My initial thoughts could be something like:
{mermaid}(
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
)
Produces:
`
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
And then of course the mermaid JS needs to be included in the HTML file.
@Hviid commented on GitHub (Jul 5, 2016):
Wow, totally awesome @xoofx.
@xoofx commented on GitHub (Jul 5, 2016):
I have added a preliminary support for mermaid diagrams block by commit
c6c2f58It is using the regular fenced code block and detect if
mermaidis used to output a div block instead of a pre/code block:will output:
Note that in order to fully support this in the Markdown Editor for Visual Studio, we will have to add support for layouts.
@janderson-bh commented on GitHub (Oct 24, 2025):
I think this should actually render as
@xoofx commented on GitHub (Oct 24, 2025):
Yes, it was actually changed by this commit
090e6d791alast year.Not sure why I used div in the first place.
@janderson-bh commented on GitHub (Oct 26, 2025):
That's strange, I'm using 0.43.0 and getting this output
@xoofx commented on GitHub (Oct 28, 2025):
Please open a new issue with a small repro with exact code you are using to create this.