summaryrefslogtreecommitdiffstats
path: root/web_src/js/markup/mermaid.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/markup/mermaid.js')
-rw-r--r--web_src/js/markup/mermaid.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.js
index f9f069ed1e..7c7ee26c3c 100644
--- a/web_src/js/markup/mermaid.js
+++ b/web_src/js/markup/mermaid.js
@@ -8,8 +8,9 @@ function displayError(el, err) {
el.closest('pre').before(errorNode);
}
-export async function renderMermaid(els) {
- if (!els || !els.length) return;
+export async function renderMermaid() {
+ const els = document.querySelectorAll('.markup code.language-mermaid');
+ if (!els.length) return;
const {default: mermaid} = await import(/* webpackChunkName: "mermaid" */'mermaid');