Skip to content

Commit 19a6616

Browse files
a-haritiLms24
authored andcommitted
fix broken text on mermaid diagrams (#12046)
1 parent 3883b4f commit 19a6616

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/mermaid.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export default function Mermaid() {
3030
if (mermaidBlocks.length === 0) {
3131
return;
3232
}
33-
const {default: mermaid} = await import('mermaid');
33+
// we have to dig like this as the nomral import doesn't work
34+
const {default: mermaid} = await import('mermaid/dist/mermaid.esm.min.mjs');
3435
mermaid.initialize({startOnLoad: false});
3536
mermaidBlocks.forEach(lightModeblock => {
3637
// get rid of code highlighting

0 commit comments

Comments
 (0)