diff --git a/build-slides.sh b/build-slides.sh index dfaf746..417a5c6 100755 --- a/build-slides.sh +++ b/build-slides.sh @@ -61,9 +61,10 @@ document.querySelectorAll('code.language-mermaid').forEach(el => { const div = document.createElement('div'); div.className = 'mermaid'; div.textContent = el.textContent; - el.closest('pre').replaceWith(div); + el.parentElement.replaceWith(div); }); -mermaid.initialize({ startOnLoad: true, theme: 'dark' }); +mermaid.initialize({ startOnLoad: false, theme: 'dark' }); +await mermaid.run(); """ with open(path, encoding='utf-8') as f: