simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.08k stars 135 forks source link

Mermaid state diagram rendered incorrectly #160

Closed EuropeanDeveloper closed 1 year ago

EuropeanDeveloper commented 2 years ago

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

simov commented 2 years ago

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

EuropeanDeveloper commented 2 years ago

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
\```
xayjin commented 2 years ago

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

simov commented 2 years ago

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

wow-yes commented 2 years ago

Hello, same issue here. Thanks.

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

simov commented 1 year ago

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