Five production-tested Mermaid diagram patterns you can copy directly into READMEs, RFCs, and specs. All examples avoid common syntax pitfalls (quoting labels with punctuation, clean node IDs, valid arrow syntax).
| Pitfall | Broken Example | Safe Fix |
|---|---|---|
| Parentheses inside node labels | A[API (v2)] |
A["API (v2)"] |
| Colons or slashes in edge labels | A --> /v2/events B |
`A --> |
| Reserved word as node ID | end[Finish] |
finish["Finish"] |
| Spaces in node IDs | my node[Label] |
my_node["Label"] |