mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
648 stars 119 forks source link

Hugo Support {{<mermaid>}} #111

Open haeberlet opened 3 years ago

haeberlet commented 3 years ago

Hi, I'm using Hugo with the Hugo Book Theme for documentation. Hugo doesn't use a "fenced code block" like

    ```mermaid
    graph LR;
    A --> B
    B --> C 
for embedding mermaid diagrams, instead it is uses a [short code](https://themes.gohugo.io//theme/hugo-book/docs/shortcodes/mermaid/).

```text
    {{<mermaid>}}
    graph LR;
    A --> B
    B --> C
    {{</mermaid>}}

It would be great if this would be supported as well.

syheliel commented 2 years ago

I have encountered the same problem too. Currently Mermaid Preview supports drawing the mermaid graph when the cursor is in the scope of shortcode, but it means that I must switch from markdown preview window and mermaid preview window. Is it possible to add a configuration to support hugo style's mermaid mark?