Skip to content

Commit

Permalink
feat(syntax-highlight): add additional languages (#6831)
Browse files Browse the repository at this point in the history
Co-authored-by: Claas Augner <[email protected]>
Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
3 people committed Aug 19, 2022
1 parent d41d6fe commit def733d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build/syntax-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ const lazy = (creator) => {
};

const loadAllLanguages = lazy(() => {
// Some languages are always loaded by Prism, so we can omit them here:
// - Markup (atom, html, markup, mathml, rss, ssml, svg, xml)
// - CSS (css)
// - C-like (clike)
// - JavaScript (javascript, js)
loadLanguages([
"python",
"bash",
"batch",
"powershell",
"sql",
"json",
"glsl",
Expand All @@ -29,6 +35,20 @@ const loadAllLanguages = lazy(() => {
"toml",
"md",
"cs",
"jsx",
"typescript",
"diff",
"ini",
"ignore",
"less",
"regex",
"scss",
"sql",
"uri",
"wasm",
"yaml",
"pug",
// "webidl", // block list
]);
});

Expand All @@ -40,6 +60,7 @@ const loadAllLanguages = lazy(() => {
const ALIASES = new Map([
["sh", "shell"],
["jssyntax", "js"],
// ["idl", "webidl"], // block list
]);

// Over the years we have accumulated some weird <pre> tags whose
Expand Down

0 comments on commit def733d

Please sign in to comment.