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

Support Actors #117

Closed StMarian closed 2 years ago

StMarian commented 2 years ago

As far as I understand, "actor" is not supported atm. It would be helpful to have it.

Code:

sequenceDiagram
    actor Alice
    actor Bob
    Alice->>Bob: Hi Bob
    Bob->>Alice: Hi Alice

Expected: image Result: image

nicosommi commented 2 years ago

Actually, I ran into the same issue, but it doesn't seem related to this extension but rather mermaid itself. However, they fixed it in the current version, so this should be about bumping mermaid to 13.

How to test this assumption?

Prepare a diagram:

sequenceDiagram
  actor U as User
  participant API as The API
  U->>API: Calls

Run it with mermaid 8.12 (current version dependency)

docker run -it -v (pwd):/data minlag/mermaid-cli:8.12.0 -i /data/actor-issue.mmd

You will get a syntax error.

Then run:

docker run -it -v (pwd):/data minlag/mermaid-cli:8.13.2 -i /data/actor-issue.mmd

To check that it works fine.