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 authored and runchard committed Oct 17, 2021
1 parent 86d2712 commit dae4ca3
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 dae4ca3

Please sign in to comment.