Closed colindean closed 2 months ago
Mermaid.live is an editor for it.
Here's how that example looks directly in GitHub:
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
I'd be very onboard with this feature, mermaid is great and I use it myself for work ADRs.
A quick scan doesn't seem to reveal a python implementation of the mermaid library, so this would probably need to depend on the JS mermaid-cli
under the bonnet.
Hi @mrwilson and @colindean! I was just thinking how nice it would be to have this and then saw this got added with https://github.com/mrwilson/adr-viewer/pull/45 in v1.4.0.
However, after upgrading to 1.4.0, Mermaid diagrams still do not get processed/displayed. I checked the DOM and don't see the Mermaid script. My diagrams are added as
Any suggestions?
@josephm28 I've just published 1.5.0-RC1 with what I hope is the right fix, are you able to confirm it addresses the issue?
Thanks for taking a look! Yes, it works now.
My team's enjoying GitHub's support for Mermaid diagrams when writing and viewing our ADRs in GitHub instead of needing a CI pipeline for PlantUML diagrams. However, when we use adr-viewer, its output leaves the Mermaid diagrams as pre-formatted text. It'd be lovely to have an option to enable embedding the code necessary to enable Mermaid, or autodetect and include it.