DiagrammeR icon indicating copy to clipboard operation
DiagrammeR copied to clipboard

Mermaid sequence diagrams broken

Open ViRb3 opened this issue 4 years ago • 2 comments

Example 1

Code:

mermaid("
sequenceDiagram;
    B ->> A: C
    A ->> B: D
")

DiagrammeR:

image

mermaid.js:

image

Example 2

Code:

mermaid("
sequenceDiagram;
    participant A
    A ->> B: C
")

DiagrammeR:

image

mermaid.js:

image

ViRb3 avatar Nov 27 '19 18:11 ViRb3

These issues seem fixed after the last update of the mermaid library. Could you try again after installing the latest version from github using:

devtools::install_github("rich-iannone/DiagrammeR")

wligtenberg avatar Dec 16 '19 16:12 wligtenberg

Hi there @ViRb3 and @wligtenberg . I believe this issue is solved with possible a syntax/whitespace fix/work-around:

# Solution to first situation (notice the spacing of the '->>'
mermaid("
sequenceDiagram;
    B->>A: C
    A->>B: D
")

# Solution to the second situation (same '->>' solution)
mermaid("
sequenceDiagram;
    participant A
    A->>B: C
")

Thanks

ghost avatar Nov 05 '20 10:11 ghost

Closing this in favor of https://github.com/rich-iannone/DiagrammeR/issues/475.

rich-iannone avatar Nov 16 '23 15:11 rich-iannone