Skip to content

Commit

Permalink
修正 prism API 变更导致编译失败的问题 (PrismJS/prism#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverspoon19931120 committed Feb 27, 2023
1 parent 19f34d4 commit a830a33
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 a830a33

Please sign in to comment.