Files
kandev/apps/web/components
José Almeida 692fdddcc9 fix(web): make mermaid sanitizer quote-aware and detect parens in bracket labels (#763)
* fix(web): make mermaid sanitizer quote-aware and detect parens in bracket labels

Two diagrams failed to render because sanitizeMermaidCode injected nested
quotes into already-quoted labels and missed parens-as-stadium-opener inside
bracket labels. Skip ranges already inside `"..."` (recomputed between
passes) and add `(`/`)` to the bracket-pass trigger set.

* refactor(web): drop dead text.startsWith('"') guards in mermaid sanitizer

The regex character classes [^\]"], [^|"], [^)"] already exclude `"`,
so the guards were unreachable.

* fix(web): stop unterminated quote bleeding across lines in mermaid sanitizer

findQuotedRanges now stops scanning at newline; an unterminated `"` is
discarded rather than paired with a `"` on a later line where it would
silently suppress sanitization of unrelated content. Add tests for the
cross-line guard and for a bracket-with-parens adjacent to a real
stadium node on the same line.
2026-05-01 22:38:06 +01:00
..
2026-02-19 22:18:01 +00:00