~ / blog / Using MermaidJS with Pandoc

       

  1 minute(s)

       

  pandoc

GitHub recently announced support for MermaidJS. I thought it would be nice to integrate it as part of my blog using Pandoc lua filters. So the following:

```mermaid
sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    Note right of John: Rational thoughts <br/>prevail!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
```

would be rendered as:

AliceBobJohnHello John, how are you?Rational thoughts prevail!Great!How about you?Jolly good!AliceBobJohn