Skip to content

Commit 60f48ac

Browse files
authored
Update codeit.js
1 parent 9db4506 commit 60f48ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/codeit.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,10 @@ class CodeitElement extends HTMLElement {
221221
if (textToHighlight !== '') {
222222

223223
let highlightLang = Prism.util.getLanguage(elToHighlight);
224-
225-
224+
225+
if (highlightLang === 'none') highlightLang = 'plain';
226+
227+
226228
let highlightHTML = Prism.highlight(textToHighlight,
227229
Prism.languages[highlightLang],
228230
highlightLang);

0 commit comments

Comments
 (0)