markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

Mermaid state diagram rendered incorrectly

Open EuropeanDeveloper opened this issue 3 years ago • 5 comments

According to mermaid webpage it should be possible to define direction for a state diagram.

However, it looks like the direction statement is not supported in Markdown Viewer 4.0 and thus the diagram is rendered incorrectly:

picture

Browser: Mozilla Firefox 95.0

EuropeanDeveloper avatar Dec 10 '21 12:12 EuropeanDeveloper

Can you provide a sample mermaid code snippet? Probably I need to update the library version.

simov avatar Dec 10 '21 13:12 simov

It's the same one mentioned in mermaid webpage:

```mermaid
stateDiagram
    direction LR
    [*] --> A
    A --> B
    B --> C
    state B {
      direction LR
      a --> b
    }
    B --> D
\```

EuropeanDeveloper avatar Dec 10 '21 13:12 EuropeanDeveloper

Similar issue, solved after changing mermaid.min.js to newest.

xayjin avatar Jan 07 '22 03:01 xayjin

Ok, then that means I need to update it too :+1:

simov avatar Jan 07 '22 07:01 simov

Hello, same issue here. Thanks.

direction LR didn't work in markdown-viewer 4.0.

wow-yes avatar Mar 21 '22 11:03 wow-yes

Mermaid got updated in Markdown Viewer v5, you can download it from the Chrome Web Store or the releases section here.

simov avatar Dec 10 '22 17:12 simov