Skip to content

Commit

Permalink
修正 prism API 变更导致编译失败的问题 (PrismJS/prism#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkit committed Aug 21, 2020
1 parent e8cfde1 commit 6160d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nodeppt-parser/lib/markdown/prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function loadPrismLang(lang) {
let langObject = Prism.languages[lang];
if (langObject === undefined) {
try {
require('prismjs/components/prism-' + lang);
require('prismjs/components/index')([lang]);
return Prism.languages[lang];
} catch (e) {
// nothing to do
Expand Down

0 comments on commit 6160d14

Please sign in to comment.