ASCII output: inline `<i>`/`<b>` tags rendered literally; edges to subgraph IDs create phantom nodes
Thanks for the synchronous, zero-DOM ASCII renderer — using it via renderMermaidASCII(src, { colorMode: 'none' }). Two flowchart ASCII-output bugs on [email protected] (Node v24):
1. Inline formatting tags render literally
<br/> is handled (turned into a line break), but <i> / <b> / <em> / <strong> / … render as raw text:
Source:
flowchart TD
A["italic <i>word</i> and bold <b>x</b>"]Output:
┌──────────────────────────────────────┐
│ │
│ italic <i>word</i> and bold <b>x</b> │
│ │
└──────────────────────────────────────┘Expected: the tags stripped (e.g. italic word and bold x), consistent with how <br/> is already handled.
2. Edges to a subgraph ID create phantom nodes
An edge whose endpoint is a subgraph (ONE --> TWO) spawns stray ONE / TWO boxes instead of connecting the two subgraph containers:
Source:
flowchart TD
subgraph ONE["First"]
A1["a"] --> A2["b"]
end
subgraph TWO["Second"]
B1["c"] --> B2["d"]
end
ONE --> TWOOutput — the two subgraphs render correctly, but with disconnected ONE / TWO boxes off to the right:
┌───────┐ ┌───────┐
│ First │ │Second │
│ │ │ │
│ │ │ │
│ ┌───┐ │ │ ┌───┐ │ ┌─────┐
│ │ │ │ │ │ │ │ │ │
│ │ a │ │ │ │ c │ │ │ ONE │
│ │ │ │ │ │ │ │ │ │
│ └─┬─┘ │ │ └─┬─┘ │ └──┬──┘
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ ▼ │ │ ▼ │ ▼
│ ┌───┐ │ │ ┌───┐ │ ┌─────┐
│ │ │ │ │ │ │ │ │ │
│ │ b │ │ │ │ d │ │ │ TWO │
│ │ │ │ │ │ │ │ │ │
│ └───┘ │ │ └───┘ │ └─────┘
│ │ │ │
└───────┘ └───────┘ This looks like the same class as the closed #55 ("subgraph relationships render broken") — it still reproduces on 1.1.3. Posting a minimal non-CJK repro, since #55 and #89 both use CJK characters (which could suggest a character-width cause); this shows the breakage isn't width-related. Mermaid itself routes such an edge to the subgraph boundary.
Environment: [email protected], renderMermaidASCII(src, { colorMode: 'none' }), Node v24.
Source: lukilabs/beautiful-mermaid