Skip to content

Commit

Permalink
Chore: Fixed highlight.js syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Oct 4, 2021
1 parent e069fe9 commit f47478f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/renderer/MdToHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ export default class MdToHtml {
hlCode = this.cachedHighlightedCode_[cacheKey];
} else {
if (lang && hljs.getLanguage(lang)) {
hlCode = hljs.highlight(lang, trimmedStr, true).value;
// hlCode = hljs.highlight(lang, trimmedStr, true).value;
hlCode = hljs.highlight(trimmedStr, { language: lang, ignoreIllegals: true }).value;
} else {
hlCode = hljs.highlightAuto(trimmedStr).value;
}
Expand Down

0 comments on commit f47478f

Please sign in to comment.