[scripts/markdown2htmldoc] load all languages

This commit is contained in:
Dmytro Meleshko 2020-09-06 19:29:03 +03:00
parent df59241a57
commit 03cc0a5221

View file

@ -51,15 +51,14 @@ parser.addArgument('--script', {
let args = parser.parseArgs(); let args = parser.parseArgs();
loadPrismLanguages(); // loads all languages
let md = markdownIt({ let md = markdownIt({
html: true, html: true,
linkify: true, linkify: true,
highlight: (code, lang) => { highlight: (code, lang) => {
if (lang) { if (lang && Object.prototype.hasOwnProperty.call(Prism.languages, lang)) {
loadPrismLanguages([lang]); return Prism.highlight(code, Prism.languages[lang], lang);
if (Object.prototype.hasOwnProperty.call(Prism.languages, lang)) {
return Prism.highlight(code, Prism.languages[lang], lang);
}
} }
return null; return null;
}, },