diff --git a/core.js b/core.js index 6748a7f..26cf80e 100644 --- a/core.js +++ b/core.js @@ -12,7 +12,7 @@ const registerLangs = (hljs, register) => register && // Highlight with given language. const highlight = (hljs, code, lang) => - maybe(() => hljs.highlight(lang || 'plaintext', code, true).value) || '' + maybe(() => hljs.highlight(code, { language: lang || 'plaintext', ignoreIllegals: true }).value) || '' // Highlight with given language or automatically. const highlightAuto = (hljs, code, lang) =>