Skip to content

Commit

Permalink
use textContent instead of innerText
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Dec 5, 2023
1 parent fdffc83 commit a1777f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/formats/html/mermaid/mermaid-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ window.addEventListener(
for (const el of Array.from(document.querySelectorAll("pre.mermaid-js"))) {
//   doesn't appear to be treated as whitespace by mermaid
// so we replace it with a space.
const text = el.innerText.replaceAll(" ", " ");
const text = el.textContent.replaceAll(" ", " ");
const { svg: output } = await mermaid.mermaidAPI.render(
`mermaid-${++i}`,
text,
Expand Down

0 comments on commit a1777f9

Please sign in to comment.