Skip to content

Commit

Permalink
Update CodeHighlight.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
andyrichardson authored Sep 24, 2020
1 parent 281f211 commit 24fec2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/panel/components/CodeHighlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 24fec2a

Please sign in to comment.