Render mermaid diagrams

Mermaid code blocks showed up as code. Mermaid is loaded lazily, and
diagrams are redrawn when the app theme changes. DOMPurify's config
moves from a global `setConfig` to each call site, because the global
one stripped mermaid's SVG output.

Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Brandon Oxendine
2026-10-07 16:56:58 +02:00
committed by Rūdolfs Ošiņš
co-authored by Rūdolfs Ošiņš
parent ab8300e09a
commit dc1a067396
9 changed files with 1541 additions and 10 deletions
+1
View File
@@ -85,6 +85,7 @@
"marked-katex-extension": "^5.1.10",
"marked-linkify-it": "^4.0.0",
"md5": "^2.3.0",
"mermaid": "^11.16.0",
"playwright": "1.61.1",
"prettier": "^3.9.5",
"prettier-plugin-svelte": "^4.1.1",