Suppress Mermaid render error artifacts

Configure Mermaid to suppress its built-in error renderer in both
interactive UI previews and generated document HTML. Render failures now
surface through the product toast flow with a safe inline fallback instead
of leaving raw Mermaid diagnostics in the document body.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Cursor Agent
2026-06-02 12:12:48 +00:00
committed by Émile Ré
parent 6e11886365
commit dcb7ffa945
5 changed files with 101 additions and 31 deletions

View File

@@ -374,7 +374,7 @@
<script>{{.MermaidJS}}</script>
<script>
window.__mermaidReady = false;
mermaid.initialize({ startOnLoad: false, theme: 'neutral' });
mermaid.initialize({ startOnLoad: false, theme: 'neutral', suppressErrorRendering: true });
document.addEventListener('DOMContentLoaded', function () {
mermaid.run().then(function () {
window.__mermaidReady = true;