Mermaid error
Double quotes inside a quoted label
Reproduced on Mermaid 11.17.2 · Updated
Double quotes inside a quoted label in Mermaid. The exact parser message, why it happens, and corrected source that renders.
What Mermaid says
Parse error on line 2:
...TD A["He said "go" now"] --> B[Next]
----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'STR'Why it happens
The second double quote closes the label. Whatever follows is read as syntax rather than text.
The source that fails
flowchart TD
A["He said "go" now"] --> B[Next]How to fix it
Use single quotes inside the label, or the HTML entity for a double quote.
flowchart TD
A["He said "go" now"] --> B[Next]Next steps
Paste your own version into the Mermaid repair tool, which applies this correction and fourteen others and shows every change. The related page covers the surrounding syntax, and the error dictionary lists every message.