mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts/markdown2htmldoc] load all languages
This commit is contained in:
parent
df59241a57
commit
03cc0a5221
1 changed files with 4 additions and 5 deletions
|
@ -51,15 +51,14 @@ parser.addArgument('--script', {
|
|||
|
||||
let args = parser.parseArgs();
|
||||
|
||||
loadPrismLanguages(); // loads all languages
|
||||
|
||||
let md = markdownIt({
|
||||
html: true,
|
||||
linkify: true,
|
||||
highlight: (code, lang) => {
|
||||
if (lang) {
|
||||
loadPrismLanguages([lang]);
|
||||
if (Object.prototype.hasOwnProperty.call(Prism.languages, lang)) {
|
||||
return Prism.highlight(code, Prism.languages[lang], lang);
|
||||
}
|
||||
if (lang && Object.prototype.hasOwnProperty.call(Prism.languages, lang)) {
|
||||
return Prism.highlight(code, Prism.languages[lang], lang);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue