Mermaid error
An unclosed bracket inside a label
Reproduced on Mermaid 11.17.2 · Updated
An unclosed bracket inside a label in Mermaid. The exact parser message, why it happens, and corrected source that renders.
What Mermaid says
Parse error on line 2:
...owchart TD A[Plan (Q3] --> B[Next]
----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PS'Why it happens
A label that opens a round bracket without closing it leaves the parser waiting for the matching character, and the line ends first.
The source that fails
flowchart TD
A[Plan (Q3] --> B[Next]How to fix it
Close the bracket, or quote the label when the bracket is meant to be text.
flowchart TD
A["Plan (Q3"] --> 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.