From 8e520e22276d9fbc27743456dbe68732b56a4020 Mon Sep 17 00:00:00 2001 From: commenthol Date: Sat, 15 May 2021 15:26:22 +0200 Subject: [PATCH] fix: update to new highlight api See https://github.com/highlightjs/highlight.js/issues/2277 --- core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) =>