error in parser when string to parse is \nclassDiagram #3243
Labels
Graph: Class
Status: Approved
Is ready to be worked on
Type: Bug / Error
Something isn't working or is incorrect
Describe the bug
I'm using mermaid 9.1.3 through the TiddlyWiki plugin (that I updated to use 9.1.3).
This works:
It renders an empty sequence diagram
This, however, doesn't:
The error is:
This works:
The difference is that the bad code passes '\nclassDiagram..' to the parser while the good one passes 'classDiagram...'. The initial newline is parsed fine for sequence diagrams.
Note also that this doesn't work
With the error
nor this
<$mermaid text='classDiagram'/>
The error is:
passing 'sequenceDiagram' instead of 'classDiagram' in the above creates an empty sequence diagram.
Expected behavior
Handle leading and trailing newlines
The text was updated successfully, but these errors were encountered: