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
640 stars 115 forks source link

Syntax error in graph mermaid version 9.1.1 #133

Closed heberhenrique closed 1 year ago

heberhenrique commented 2 years ago

After update to latest version (1.14.0) preview is returning this message but nothing in my code was changed.

mjbvz commented 2 years ago

Please share the code

heberhenrique commented 2 years ago

I will write without mermaid notation for markdown and with it to be more clear. So I have

```mermaid
sequenceDiagram
    autonumber
    Alice->>John: Ola John, como você está?
    loop Verificando Saúde
        John->>John: Luta contra hipocondria
    end
    Note right of John: pensamentos racionais!
    John-->>Alice: Estou bem!
    John->>Bob: E você bob?
    Bob-->>John: Muito bem!
```

Then it will be this:

sequenceDiagram
    autonumber
    Alice->>John: Ola John, como você está?
    loop Verificando Saúde
        John->>John: Luta contra hipocondria
    end
    Note right of John: pensamentos racionais!
    John-->>Alice: Estou bem!
    John->>Bob: E você bob?
    Bob-->>John: Muito bem!

But when I opened in preview tab of visual studio code message was in place of diagram.

Cayan commented 2 years ago

I see a similar error on this example:

gitGraph
    commit id: "ZERO"
    branch develop
    commit id:"A"
    checkout main
    commit id:"ONE"
    checkout develop
    commit id:"B"
    checkout main
    commit id: "TWO"
    cherry-pick id:"A"
    commit id: "THREE"
    checkout develop
    commit id:"C"
k-pypin commented 2 years ago

I see a similar error on this example:

gitGraph
    commit id: "ZERO"
    branch develop
    commit id:"A"
    checkout main
    commit id:"ONE"
    checkout develop
    commit id:"B"
    checkout main
    commit id: "TWO"
    cherry-pick id:"A"
    commit id: "THREE"
    checkout develop
    commit id:"C"

Cherry-pick support is added in Mermaid 9.1.2. Currently this extension supports only 9.1.1.

mjbvz commented 1 year ago

Closing this as I can't reproduce it. I suspect it was fixed already