Skip to content

Commit

Permalink
Autoload the diff plugin if you use diff as a language.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jan 20, 2022
1 parent 489f74b commit 4df870e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PrismLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const PrismAlias = require("./PrismNormalizeAlias");
module.exports = function(language) {
if(language.startsWith("diff-") && !Prism.languages.diff) {
PrismLoader("diff");
// Bundled Plugin
require("prismjs/plugins/diff-highlight/prism-diff-highlight");

return Prism.languages.diff;
}

Expand Down

0 comments on commit 4df870e

Please sign in to comment.