update deprecated highlight.js highlight(), was getting deprecation message.

method now has new signature taking options object
indiachan-spamvector
Thomas Lynch 3 years ago
parent e1387df959
commit 08c83ac4b9
  1. 2
      helpers/posting/markdown.js

@ -95,7 +95,7 @@ module.exports = {
if (lang === 'aa') {
return `<span class='aa'>${escape(matches.groups.code)}</span>`;
} else {
const { value } = highlight(lang, trimFix, true);
const { value } = highlight(trimFix, { language: lang, ignoreIllegals: true });
return `<span class='code hljs'><small>language: ${lang}</small>\n${value}</span>`;
}
}

Loading…
Cancel
Save