From 24fec2ac0b69fcb30d6f900106462b96d390f61f Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Thu, 24 Sep 2020 11:08:05 +0100 Subject: [PATCH] Update CodeHighlight.tsx --- src/panel/components/CodeHighlight.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panel/components/CodeHighlight.tsx b/src/panel/components/CodeHighlight.tsx index 381bd079..95f313fb 100644 --- a/src/panel/components/CodeHighlight.tsx +++ b/src/panel/components/CodeHighlight.tsx @@ -22,7 +22,8 @@ export const CodeHighlight: FC< ? ref.replaceChild(child, ref.firstChild) : ref.appendChild(child); - // Run prism on pre + // Run prism on element (in web worker/async) + // when code is a chonker Prism.highlightElement(ref, code.length > 600); }, [language, code]