From f957a4b8f2f68fa73ab55c7081c1fbbd479aef3e Mon Sep 17 00:00:00 2001 From: p-sw <shinwoo.park@psw.kr> Date: Sun, 2 Jun 2024 08:57:29 +0900 Subject: [PATCH] fix: add ignoreUnescapedHTML --- packages/react/src/components/LoadedCode.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/components/LoadedCode.tsx b/packages/react/src/components/LoadedCode.tsx index 9c33963..378e9a2 100644 --- a/packages/react/src/components/LoadedCode.tsx +++ b/packages/react/src/components/LoadedCode.tsx @@ -22,6 +22,7 @@ export const LoadedCode = forwardRef<HTMLPreElement, { from: string }>( useEffect(() => { if (state && ref.current && !ref.current.dataset.highlighted) { + hljs.configure({ ignoreUnescapedHTML: true }); hljs.highlightElement(ref.current); } }, [state]);