Flowchart
Parse flowchart / graph nodes, edges and direction into a recognizable SVG plan with node groups and arrowed edges.
Inputs and parameters
input— Mermaid flowchart source
Real example
flowchart TD
Start["Parse Mermaid source"] --> Guard{"Strict policy<br/>allows it?"}
Guard -->|yes| Render["Build SVG plan & PNG steps"]
Guard -->|no| Report["Report line / column / node"]
→ flowchart: 4 nodes / 3 edges; labels carry CJK, &, <br/> line breaks and quotes; SVG has <g class="node">, <g class="edge"> and arrow markers; no script tags or external links.
Limits and failure handling
The deterministic parser covers a common subset of the four task-book grammars; it is not a full Mermaid renderer. Complex nested subgraph layout, theme variables and PNG bitmaps are untested. Inputs over 100KiB or 1000 nodes are rejected with localization.
FAQ
Which directions are supported?
TB / TD / BT / RL / LR are recorded in the structure; TB is the default.
Can I use a click directive?
No. Strict mode rejects click / call / href before type detection to prevent user-code execution.