Skip to content

Commit

Permalink
updates highlight to ^10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bmordan committed May 27, 2021
1 parent 5bdda51 commit f352c30
Show file tree
Hide file tree
Showing 4 changed files with 4,216 additions and 19 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -41,10 +41,10 @@ function markdownpdf (opts) {
var self = this

var mdParser = new Remarkable(opts.remarkable.preset, extend({
highlight: function (str, lang) {
if (lang && hljs.getLanguage(lang)) {
highlight: function (str, language) {
if (language && hljs.getLanguage(language)) {
try {
return hljs.highlight(lang, str).value
return hljs.highlight(str, { language }).value
} catch (err) {}
}

Expand Down

0 comments on commit f352c30

Please sign in to comment.