Skip to content

Commit

Permalink
fix: update to new highlight api
Browse files Browse the repository at this point in the history
  • Loading branch information
commenthol committed May 15, 2021
1 parent bf54b94 commit 8e520e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down

0 comments on commit 8e520e2

Please sign in to comment.