Draw Mermaid labels as HTML so arrows and entities read as written (#312)
Mermaid's SVG-text label path mangles common planning text: on 11.12.0, `Vec<T>`, `#quot;` and `#gt;` showed up as `<T>`, `"` and `>`, and on 11.17 a bare `>` in `->` or `=>` was dropped. That path only runs because Chopin turned HTML labels off. Turn HTML labels back on, as GitHub, GitLab, Docusaurus and Obsidian do. securityLevel stays "strict", so labels are still sanitized with DOMPurify and scripts and click handlers stay off. Upgrade Mermaid to 11.17.2. The Chopin theme already styles HTML node and edge labels. Fixes #312 Assistant-model: Claude Opus 5.5 Assistant-workflow: inline Assistant-duration: 15m converged, estimated unmeasured Assistant-verification: playwright e2e passed: new "diagram labels keep arrows, operators and entity codes as written" fails on main's config (labels read `Vec<T>`, `say "hi" ... > 0`) and passes with this change Assistant-verification: playwright e2e passed: bun run e2e e2e/code.e2e.ts e2e/responsive-content.e2e.ts, 28 passed Assistant-verification: bun test passed: 3669 tests, 3 skip, 0 fail Assistant-verification: bun run types passed: all workspaces Assistant-verification: bun run ci passed: dprint, oxlint, tokens, design contract, design record, Impeccable (no new findings) Assistant-verification: manual browser comparison passed: flowchart, sequence, class, state and ER screenshots before and after keep the Chopin theme; HTML labels add slightly taller line spacing in nodes User-preference: Prefer what popular projects do (Mermaid HTML labels under strict) over custom patches to dependencies Co-authored-by: Alex Lavaee <lavaman131@github.com>
Parent9200fd6
4 files changed+43-43
StackedSplit