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
630 stars 112 forks source link

stateDiagram is not rendered #235

Closed IvanKostyuk closed 3 months ago

IvanKostyuk commented 5 months ago

no problem with flowchart and sequence, but state diagram is not rendered.

mjbvz commented 5 months ago

Please share an example

RokeJulianLockhart commented 5 months ago

https://github.com/mjbvz/vscode-markdown-mermaid/issues/235#issue-2092225477

@IvanKostyuk, https://mermaid.js.org/syntax/stateDiagram.html#state-diagrams as:

::: mermaid
stateDiagram-v2
    [*] --> Still
    Still --> [*]

    Still --> Moving
    Moving --> Still
    Moving --> Crash
    Crash --> [*]

:::

...works for me.

mshalaby commented 4 months ago

no problem with flowchart and sequence, but state diagram is not rendered.

@IvanKostyuk in case this issue is still relevant, I can confirm the state diagram works for me. However, a possible cause that I've noticed, is that when a mermaid diagram fails to render for any reason (such as: an unsupported diagram or a syntax error), it causes all subsequent diagrams within the markdown file not to render. So, the issue might actually be with the preceding diagram rather than with the state diagram itself. Hope that helps!

mjbvz commented 3 months ago

Works for me too

Image

Closing as not-reproducible without more info