123
This commit is contained in:
@ -57,7 +57,7 @@ export function LessonContentViewer({ content, className }: LessonContentViewerP
|
|||||||
if (!containerRef.current || !content) return;
|
if (!containerRef.current || !content) return;
|
||||||
const mermaidNodes = containerRef.current.querySelectorAll('pre[data-language="mermaid"]');
|
const mermaidNodes = containerRef.current.querySelectorAll('pre[data-language="mermaid"]');
|
||||||
if (mermaidNodes.length === 0) return;
|
if (mermaidNodes.length === 0) return;
|
||||||
mermaid.run({ nodes: Array.from(mermaidNodes), suppressErrors: true }).catch(() => {});
|
mermaid.run({ nodes: Array.from(mermaidNodes) as HTMLElement[], suppressErrors: true }).catch(() => {});
|
||||||
}, [content]);
|
}, [content]);
|
||||||
|
|
||||||
if (!editor) return null;
|
if (!editor) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user