Skip to content

Self-hosted AI workspace.

Python

fix(document): render Mermaid in markdown preview (#2415)

ooovenenoso2bfd4533fa38
diff --git a/static/js/document.js b/static/js/document.js
index 6696d60d4..1d38121e1 100644
--- a/static/js/document.js
+++ b/static/js/document.js
@@ -8554,6 +8554,9 @@ import * as Modals from './modalManager.js';
if (window.hljs) {
preview.querySelectorAll('pre code').forEach(b => window.hljs.highlightElement(b));
}
+ if (markdownModule && markdownModule.renderMermaid) {
+ markdownModule.renderMermaid(preview);
+ }
preview.style.display = '';
wrap.style.display = 'none';
} else {