Quote unquoted node-label payloads in flowchart-family diagrams when they contain characters that the Mermaid 11 lexer treats as control tokens โ specifically (, ), {, }, ,, :. Idempotent: a label that already begins with " is left untouched.
Recognised label shapes (the inner payload is what gets quoted):
A[โฆ] square-bracket node
A(โฆ) rounded node โ only when the inner payload starts with another delimiter (e.g. A((..)), A(["..."])), never plain A(text) which is a valid shape on its own.
A{โฆ} diamond node
A{{โฆ}} hexagon node
A[/โฆ/] trapezoid / parallelogram variants
A>โฆ] asymmetric / flag node
Applies only to top-level diagram types flowchart / graph.
Quote unquoted node-label payloads in flowchart-family diagrams when they contain characters that the Mermaid 11 lexer treats as control tokens โ specifically
(,),{,},,,:. Idempotent: a label that already begins with"is left untouched.Recognised label shapes (the inner payload is what gets quoted):
A[โฆ]square-bracket nodeA(โฆ)rounded node โ only when the inner payload starts with another delimiter (e.g.A((..)),A(["..."])), never plainA(text)which is a valid shape on its own.A{โฆ}diamond nodeA{{โฆ}}hexagon nodeA[/โฆ/]trapezoid / parallelogram variantsA>โฆ]asymmetric / flag nodeApplies only to top-level diagram types
flowchart/graph.