joplin-plugin-enhancement
joplin-plugin-enhancement copied to clipboard
Parse error in Mermaid sequence diagrams
It seems like this plugin is unable to parse newer keywords for Mermaid sequence diagrams, here's an example:
Could not render Graph:
Parse error on line 2:
... Purple Alice & John participant A
-----------------------^
Expecting 'SOLID_OPEN_ARROW', 'DOTTED_OPEN_ARROW', 'SOLID_ARROW', 'DOTTED_ARROW', 'SOLID_CROSS', 'DOTTED_CROSS', 'SOLID_POINT', 'DOTTED_POINT', got 'NEWLINE'
and as a screenshot:
and now here's the sample diagram text to replicate with:
sequenceDiagram
box Purple Alice & John
participant A
participant J
end
box Another Group
participant B
participant C
end
A->>J: Hello John, how are you?
J->>A: Great!
A->>B: Hello Bob, how is Charly?
B->>C: Hello Charly, how are you?
and as you can see in Github it is correct and renders fine:
sequenceDiagram
box Purple Alice & John
participant A
participant J
end
box Another Group
participant B
participant C
end
A->>J: Hello John, how are you?
J->>A: Great!
A->>B: Hello Bob, how is Charly?
B->>C: Hello Charly, how are you?
This example comes directly from the Mermaid docs: https://mermaid.js.org/syntax/sequenceDiagram.html
Upon closer inspection several of the reserved keywords are not able to parse, perhaps it would be best to do a run through all the updated documentation and check all newer keywords.