Skip to content

Commit

Permalink
修改代码语法错误
Browse files Browse the repository at this point in the history
  • Loading branch information
HcGys committed May 22, 2024
1 parent e09354a commit 3646b6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/utils/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const renderCode = (el, theme, plugins) => {
Prism.plugins.autoloader.languages_path = `${prismCdn}/components/`
if (plugins) {
require('prismjs/plugins/toolbar/prism-toolbar')
plugins.split(',').map(item => {return item.trim()} ).forEach(p => {
plugins.split(',').map(item => { return item.trim() }).forEach(p => {
if (p === 'showLanguage') {
require('prismjs/plugins/show-language/prism-show-language')
} else if (p === 'copyButton') {
require('prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard')
}
});
})
}
}
loadCss(theme, prismCdn)
Expand Down

0 comments on commit 3646b6b

Please sign in to comment.