mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Chore: Fixed highlight.js syntax
Ref: https://github.com/highlightjs/highlight.js/issues/2277
This commit is contained in:
parent
e069fe90c8
commit
f47478f730
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user