Skip to content

Commit

Permalink
Merge pull request #20 from commenthol/master
Browse files Browse the repository at this point in the history
fix: update to new highlight api
  • Loading branch information
valeriangalliat committed May 16, 2021
2 parents 2c93df7 + 8e520e2 commit 8a624b2
Show file tree
Hide file tree
Showing 4 changed files with 1,390 additions and 723 deletions.
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
Loading

0 comments on commit 8a624b2

Please sign in to comment.