From 5cddf57208273d3dd2e985ac83d99951e37ee1b2 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:17:21 +0800 Subject: [PATCH] fix: refreshing the mermaid theme may fail --- _javascript/modules/components/mermaid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_javascript/modules/components/mermaid.js b/_javascript/modules/components/mermaid.js index 2b4759f4726..91df4f25497 100644 --- a/_javascript/modules/components/mermaid.js +++ b/_javascript/modules/components/mermaid.js @@ -11,7 +11,7 @@ function refreshTheme(event) { const mermaidList = document.getElementsByClassName(MERMAID); [...mermaidList].forEach((elem) => { - const svgCode = elem.previousSibling.children.item(0).innerHTML; + const svgCode = elem.previousSibling.children.item(0).textContent; elem.textContent = svgCode; elem.removeAttribute('data-processed'); });