Added test to sort the language list (#2222)

This commit is contained in:
Michael Schmidt 2020-06-27 22:38:50 +02:00 committed by GitHub
parent e756be3f7f
commit a375872875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 143 additions and 111 deletions

File diff suppressed because one or more lines are too long

View File

@ -81,7 +81,7 @@
"owner": "dellagustin"
},
"abnf": {
"title": "Augmented BackusNaur form",
"title": "ABNF",
"owner": "RunDevelopment"
},
"actionscript": {
@ -137,15 +137,15 @@
"title": "AsciiDoc",
"owner": "Golmote"
},
"asm6502": {
"title": "6502 Assembly",
"owner": "kzurawel"
},
"aspnet": {
"title": "ASP.NET (C#)",
"require": ["markup", "csharp"],
"owner": "nauzilus"
},
"asm6502": {
"title": "6502 Assembly",
"owner": "kzurawel"
},
"autohotkey": {
"title": "AutoHotkey",
"owner": "aviaryan"
@ -184,10 +184,10 @@
"owner": "Golmote"
},
"bnf": {
"title": "BackusNaur form",
"title": "BNF",
"alias": "rbnf",
"aliasTitles": {
"rbnf": "Routing BackusNaur form"
"rbnf": "RBNF"
},
"owner": "RunDevelopment"
},
@ -208,11 +208,6 @@
"require": "clike",
"owner": "zeitgeist87"
},
"concurnas": {
"title": "Concurnas",
"alias": "conc",
"owner": "jasontatton"
},
"csharp": {
"title": "C#",
"require": "clike",
@ -228,29 +223,34 @@
"title": "CIL",
"owner": "sbrl"
},
"clojure": {
"title": "Clojure",
"owner": "troglotit"
},
"cmake": {
"title": "CMake",
"owner": "mjrogozinski"
},
"coffeescript": {
"title": "CoffeeScript",
"require": "javascript",
"alias": "coffee",
"owner": "R-osey"
},
"cmake": {
"title": "CMake",
"owner": "mjrogozinski"
"concurnas": {
"title": "Concurnas",
"alias": "conc",
"owner": "jasontatton"
},
"clojure": {
"title": "Clojure",
"owner": "troglotit"
"csp": {
"title": "Content-Security-Policy",
"owner": "ScottHelme"
},
"crystal": {
"title": "Crystal",
"require": "ruby",
"owner": "MakeNowJust"
},
"csp": {
"title": "Content-Security-Policy",
"owner": "ScottHelme"
},
"css-extras": {
"title": "CSS Extras",
"require": "css",
@ -292,7 +292,7 @@
"owner": "JustinBeckwith"
},
"ebnf": {
"title": "Extended BackusNaur form",
"title": "EBNF",
"owner": "RunDevelopment"
},
"eiffel": {
@ -363,6 +363,12 @@
"require": "markup-templating",
"owner": "RunDevelopment"
},
"gml": {
"title": "GameMaker Language",
"alias": "gamemakerlanguage",
"require": "clike",
"owner": "LiarOnce"
},
"gcode": {
"title": "G-code",
"owner": "RunDevelopment"
@ -388,12 +394,6 @@
"require": "c",
"owner": "Golmote"
},
"gml": {
"title": "GameMaker Language",
"alias": "gamemakerlanguage",
"require": "clike",
"owner": "LiarOnce"
},
"go": {
"title": "Go",
"require": "clike",
@ -475,10 +475,6 @@
"title": "Icon",
"owner": "Golmote"
},
"iecst": {
"title": "Structured Text (IEC 61131-3)",
"owner": "serhioromano"
},
"inform7": {
"title": "Inform 7",
"owner": "Golmote"
@ -552,6 +548,24 @@
],
"owner": "RunDevelopment"
},
"json": {
"title": "JSON",
"alias": "webmanifest",
"aliasTitles": {
"webmanifest": "Web App Manifest"
},
"owner": "CupOfTea696"
},
"json5": {
"title": "JSON5",
"require": "json",
"owner": "RunDevelopment"
},
"jsonp": {
"title": "JSONP",
"require": "json",
"owner": "RunDevelopment"
},
"jsstacktrace": {
"title": "JS stack trace",
"owner": "sbrl"
@ -569,24 +583,6 @@
],
"owner": "RunDevelopment"
},
"json": {
"title": "JSON",
"alias": "webmanifest",
"aliasTitles": {
"webmanifest": "Web App Manifest"
},
"owner": "CupOfTea696"
},
"jsonp": {
"title": "JSONP",
"require": "json",
"owner": "RunDevelopment"
},
"json5": {
"title": "JSON5",
"require": "json",
"owner": "RunDevelopment"
},
"julia": {
"title": "Julia",
"owner": "cdagnino"
@ -912,11 +908,6 @@
"title": "React TSX",
"require": ["jsx", "typescript"]
},
"renpy": {
"title": "Ren'py",
"alias": "rpy",
"owner": "HyuchiaDiego"
},
"reason": {
"title": "Reason",
"require": "clike",
@ -934,6 +925,11 @@
],
"owner": "RunDevelopment"
},
"renpy": {
"title": "Ren'py",
"alias": "rpy",
"owner": "HyuchiaDiego"
},
"rest": {
"title": "reST (reStructuredText)",
"owner": "Golmote"
@ -1035,6 +1031,10 @@
"title": "SQL",
"owner": "multipetros"
},
"iecst": {
"title": "Structured Text (IEC 61131-3)",
"owner": "serhioromano"
},
"stylus": {
"title": "Stylus",
"owner": "vkbansal"
@ -1044,6 +1044,21 @@
"require": "clike",
"owner": "chrischares"
},
"t4-templating": {
"title": "T4 templating",
"owner": "RunDevelopment"
},
"t4-cs": {
"title": "T4 Text Templates (C#)",
"require": ["t4-templating", "csharp"],
"alias": "t4",
"owner": "RunDevelopment"
},
"t4-vb": {
"title": "T4 Text Templates (VB)",
"require": ["t4-templating", "vbnet"],
"owner": "RunDevelopment"
},
"tap": {
"title": "TAP",
"owner": "isaacs",
@ -1053,6 +1068,11 @@
"title": "Tcl",
"owner": "PeterChaplin"
},
"tt2": {
"title": "Template Toolkit 2",
"require": ["clike", "markup-templating"],
"owner": "gflohr"
},
"textile": {
"title": "Textile",
"require": "markup",
@ -1063,11 +1083,6 @@
"title": "TOML",
"owner": "RunDevelopment"
},
"tt2": {
"title": "Template Toolkit 2",
"require": ["clike", "markup-templating"],
"owner": "gflohr"
},
"turtle": {
"title": "Turtle",
"alias": "trig",
@ -1088,21 +1103,6 @@
"alias": "ts",
"owner": "vkbansal"
},
"t4-cs": {
"title": "T4 Text Templates (C#)",
"require": ["t4-templating", "csharp"],
"alias": "t4",
"owner": "RunDevelopment"
},
"t4-vb": {
"title": "T4 Text Templates (VB)",
"require": ["t4-templating", "vbnet"],
"owner": "RunDevelopment"
},
"t4-templating": {
"title": "T4 templating",
"owner": "RunDevelopment"
},
"unrealscript": {
"title": "UnrealScript",
"alias": ["uscript", "uc"],

View File

@ -42,8 +42,8 @@
"firestore-security-rules": "clike",
"flow": "javascript",
"ftl": "markup-templating",
"glsl": "c",
"gml": "clike",
"glsl": "c",
"go": "clike",
"groovy": "clike",
"haml": "ruby",
@ -62,9 +62,9 @@
"javadoclike"
],
"js-extras": "javascript",
"js-templates": "javascript",
"jsonp": "json",
"json5": "json",
"jsonp": "json",
"js-templates": "javascript",
"kotlin": "clike",
"latte": [
"clike",
@ -120,14 +120,6 @@
"sparql": "turtle",
"sqf": "clike",
"swift": "clike",
"tap": "yaml",
"textile": "markup",
"tt2": [
"clike",
"markup-templating"
],
"twig": "markup",
"typescript": "javascript",
"t4-cs": [
"t4-templating",
"csharp"
@ -136,6 +128,14 @@
"t4-templating",
"vbnet"
],
"tap": "yaml",
"tt2": [
"clike",
"markup-templating"
],
"textile": "markup",
"twig": "markup",
"typescript": "javascript",
"vala": "clike",
"vbnet": "basic",
"velocity": "markup",
@ -159,10 +159,10 @@
"shell": "bash",
"shortcode": "bbcode",
"rbnf": "bnf",
"conc": "concurnas",
"cs": "csharp",
"dotnet": "csharp",
"coffee": "coffeescript",
"conc": "concurnas",
"jinja2": "django",
"dns-zone": "dns-zone-file",
"dockerfile": "docker",
@ -196,9 +196,9 @@
"sol": "solidity",
"sln": "solution-file",
"rq": "sparql",
"t4": "t4-cs",
"trig": "turtle",
"ts": "typescript",
"t4": "t4-cs",
"uscript": "unrealscript",
"uc": "unrealscript",
"vb": "visual-basic",

View File

@ -1 +1 @@
!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",webmanifest:"json",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r<s;r++){var i=t[r][a];i&&setTimeout(i,0)}t.length=0}}}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",webmanifest:"json",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r<s;r++){var i=t[r][a];i&&setTimeout(i,0)}t.length=0}}}();

View File

@ -22,7 +22,7 @@
"clike": "C-like",
"js": "JavaScript",
"abap": "ABAP",
"abnf": "Augmented BackusNaur form",
"abnf": "ABNF",
"al": "AL",
"antlr4": "ANTLR4",
"g4": "ANTLR4",
@ -32,22 +32,22 @@
"arff": "ARFF",
"asciidoc": "AsciiDoc",
"adoc": "AsciiDoc",
"asm6502": "6502 Assembly",
"aspnet": "ASP.NET (C#)",
"asm6502": "6502 Assembly",
"autohotkey": "AutoHotkey",
"autoit": "AutoIt",
"basic": "BASIC",
"bbcode": "BBcode",
"bnf": "BackusNaur form",
"rbnf": "Routing BackusNaur form",
"conc": "Concurnas",
"bnf": "BNF",
"rbnf": "RBNF",
"csharp": "C#",
"cs": "C#",
"dotnet": "C#",
"cpp": "C++",
"cil": "CIL",
"coffee": "CoffeeScript",
"cmake": "CMake",
"coffee": "CoffeeScript",
"conc": "Concurnas",
"csp": "Content-Security-Policy",
"css-extras": "CSS Extras",
"dax": "DAX",
@ -56,7 +56,7 @@
"dns-zone-file": "DNS zone file",
"dns-zone": "DNS zone file",
"dockerfile": "Docker",
"ebnf": "Extended BackusNaur form",
"ebnf": "EBNF",
"ejs": "EJS",
"etlua": "Embedded Lua templating",
"erb": "ERB",
@ -66,12 +66,12 @@
"fsharp": "F#",
"firestore-security-rules": "Firestore security rules",
"ftl": "FreeMarker Template Language",
"gml": "GameMaker Language",
"gamemakerlanguage": "GameMaker Language",
"gcode": "G-code",
"gdscript": "GDScript",
"gedcom": "GEDCOM",
"glsl": "GLSL",
"gml": "GameMaker Language",
"gamemakerlanguage": "GameMaker Language",
"graphql": "GraphQL",
"hs": "Haskell",
"hcl": "HCL",
@ -80,7 +80,6 @@
"hpkp": "HTTP Public-Key-Pins",
"hsts": "HTTP Strict-Transport-Security",
"ichigojam": "IchigoJam",
"iecst": "Structured Text (IEC 61131-3)",
"inform7": "Inform 7",
"javadoc": "JavaDoc",
"javadoclike": "JavaDoc-like",
@ -88,12 +87,12 @@
"jq": "JQ",
"jsdoc": "JSDoc",
"js-extras": "JS Extras",
"jsstacktrace": "JS stack trace",
"js-templates": "JS Templates",
"json": "JSON",
"webmanifest": "Web App Manifest",
"jsonp": "JSONP",
"json5": "JSON5",
"jsonp": "JSONP",
"jsstacktrace": "JS stack trace",
"js-templates": "JS Templates",
"latex": "LaTeX",
"tex": "TeX",
"context": "ConTeXt",
@ -165,15 +164,16 @@
"splunk-spl": "Splunk SPL",
"sqf": "SQF: Status Quo Function (Arma 3)",
"sql": "SQL",
"tap": "TAP",
"toml": "TOML",
"tt2": "Template Toolkit 2",
"trig": "TriG",
"ts": "TypeScript",
"iecst": "Structured Text (IEC 61131-3)",
"t4-templating": "T4 templating",
"t4-cs": "T4 Text Templates (C#)",
"t4": "T4 Text Templates (C#)",
"t4-vb": "T4 Text Templates (VB)",
"t4-templating": "T4 templating",
"tap": "TAP",
"tt2": "Template Toolkit 2",
"toml": "TOML",
"trig": "TriG",
"ts": "TypeScript",
"uscript": "UnrealScript",
"uc": "UnrealScript",
"vbnet": "VB.Net",

View File

@ -1 +1 @@
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented BackusNaur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BackusNaur form",rbnf:"Routing BackusNaur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended BackusNaur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",jsstacktrace:"JS stack trace","js-templates":"JS Templates",json:"JSON",webmanifest:"Web App Manifest",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();

View File

@ -301,4 +301,36 @@ describe('components.json', function () {
}
});
it('- should have a sorted language list', function () {
const ignore = new Set(['meta', 'markup', 'css', 'clike', 'javascript']);
/** @type {{ id: string, title: string }[]} */
const languages = Object.keys(components.languages).filter(key => !ignore.has(key)).map(key => {
return {
id: key,
title: components.languages[key].title
};
});
/**
* Transforms the given title into an intermediate representation to allowed for sensible comparisons
* between titles.
*
* @param {string} title
*/
function transformTitle(title) {
return title.replace(/\W+/g, '').replace(/^\d+/, '').toLowerCase();
}
const sorted = [...languages].sort((a, b) => {
const comp = transformTitle(a.title).localeCompare(transformTitle(b.title));
if (comp !== 0) {
return comp;
}
// a and b have the same intermediate form (e.g. "C" => "C", "C++" => "C", "C#" => "C").
a.title.toLowerCase().localeCompare(b.title.toLowerCase())
});
assert.sameOrderedMembers(languages, sorted);
});
});