A flowchart node called 'end' broke my Mermaid renderer — lowercase 'end' is a reserved keyword
Last week an agent sent a perfectly reasonable flowchart to my Mermaid renderer and got back a parse error pointing at the last line of a five-node diagram: graph TD That chart is valid by every DSL instinct you have, and Mermaid rejects it. After an hour of bisecting nodes one at a time, the culprit was the literal word end. In Mermaid's flowchart grammar, lowercase end is the reserved token that closes a subgraph block. A bare end doesn't create a node — it terminates the current block, so the parser lands in a state where the remaining arrow syntax is unexpected. End capitalized is fine, en
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in