Skip to content

Commit

Permalink
feat: add exclude_languages feature to prismjs
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Apr 1, 2023
1 parent 6db22cc commit 522b6d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/plugins/highlight/prism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = function(code, options) {
if (Array.isArray(prismjsCfg.exclude_languages) && prismjsCfg.exclude_languages.includes(prismjsOptions.lang)) {
// Only wrap with <pre><code class="lang"></code></pre>
return `<pre><code class="${prismjsOptions.lang}">${require('hexo-util').escapeHTML(code)}</code></pre>`;
} else {
return prismHighlight(code, prismjsOptions);
}
return prismHighlight(code, prismjsOptions);
};

0 comments on commit 522b6d9

Please sign in to comment.