Skip to content

Commit

Permalink
Add file extensions support for major languages (#1478)
Browse files Browse the repository at this point in the history
This adds aliases for file extensions of some major languages.

- `coffee` -> `coffeescript`
- `md` -> `markdown`
- `py` -> `python`
- `rb` -> `ruby`
- `yml` -> `yaml`
  • Loading branch information
ybiquitous authored and RunDevelopment committed Dec 3, 2018
1 parent 4a8219a commit 0c8f650
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions components/prism-coffeescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@ Prism.languages.insertBefore('coffeescript', 'keyword', {

delete Prism.languages.coffeescript['template-string'];

Prism.languages.coffee = Prism.languages.coffeescript;
}(Prism));
2 changes: 1 addition & 1 deletion components/prism-coffeescript.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/prism-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,5 @@ Prism.hooks.add('wrap', function (env) {

env.content = Prism.highlight(code, grammar, codeLang);
});

Prism.languages.md = Prism.languages.markdown;
2 changes: 1 addition & 1 deletion components/prism-markdown.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/prism-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ Prism.languages.python = {
};

Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python;

Prism.languages.py = Prism.languages.python;
2 changes: 1 addition & 1 deletion components/prism-python.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/prism-ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,6 @@
}
}
];

Prism.languages.rb = Prism.languages.ruby;
}(Prism));
2 changes: 1 addition & 1 deletion components/prism-ruby.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/prism-yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ Prism.languages.yaml = {
'important': /[&*][\w]+/,
'punctuation': /---|[:[\]{}\-,|>?]|\.\.\./
};

Prism.languages.yml = Prism.languages.yaml;
Loading

0 comments on commit 0c8f650

Please sign in to comment.