slice of languages arranged in alphabetical order

This commit is contained in:
Manuel Carmona 2017-04-12 09:10:16 +02:00
parent 9a9968dca0
commit 25e835f5fd
2 changed files with 71 additions and 51 deletions

View File

@ -24,7 +24,12 @@ func Languages(data []byte, languagesTmplPath, languagesTmplName, commit string)
return nil, err return nil, err
} }
languagesByExtension := buildExtensionLanguageMap(languages) orderedKeyList, err := getAlphabeticalOrderedKeys(data)
if err != nil {
return nil, err
}
languagesByExtension := buildExtensionLanguageMap(languages, orderedKeyList)
buf := &bytes.Buffer{} buf := &bytes.Buffer{}
if err := executeLanguagesTemplate(buf, languagesByExtension, languagesTmplPath, languagesTmplName, commit); err != nil { if err := executeLanguagesTemplate(buf, languagesByExtension, languagesTmplPath, languagesTmplName, commit); err != nil {
@ -34,10 +39,25 @@ func Languages(data []byte, languagesTmplPath, languagesTmplName, commit string)
return buf.Bytes(), nil return buf.Bytes(), nil
} }
func buildExtensionLanguageMap(languages map[string]*languageInfo) map[string][]string { func getAlphabeticalOrderedKeys(data []byte) ([]string, error) {
var yamlSlice yaml.MapSlice
if err := yaml.Unmarshal(data, &yamlSlice); err != nil {
return nil, err
}
orderedKeyList := make([]string, 0)
for _, lang := range yamlSlice {
orderedKeyList = append(orderedKeyList, lang.Key.(string))
}
return orderedKeyList, nil
}
func buildExtensionLanguageMap(languages map[string]*languageInfo, orderedKeyList []string) map[string][]string {
extensionLangsMap := make(map[string][]string) extensionLangsMap := make(map[string][]string)
for lang, info := range languages { for _, lang := range orderedKeyList {
for _, extension := range info.Extensions { langInfo := languages[lang]
for _, extension := range langInfo.Extensions {
extensionLangsMap[extension] = append(extensionLangsMap[extension], lang) extensionLangsMap[extension] = append(extensionLangsMap[extension], lang)
} }
} }

View File

@ -62,7 +62,7 @@ var languagesByExtension = map[string][]string{
".arpa": {"DNS Zone"}, ".arpa": {"DNS Zone"},
".as": {"ActionScript"}, ".as": {"ActionScript"},
".asax": {"ASP"}, ".asax": {"ASP"},
".asc": {"AGS Script", "Public Key", "AsciiDoc"}, ".asc": {"AGS Script", "AsciiDoc", "Public Key"},
".asciidoc": {"AsciiDoc"}, ".asciidoc": {"AsciiDoc"},
".ascx": {"ASP"}, ".ascx": {"ASP"},
".asd": {"Common Lisp"}, ".asd": {"Common Lisp"},
@ -92,7 +92,7 @@ var languagesByExtension = map[string][]string{
".bash": {"Shell"}, ".bash": {"Shell"},
".bat": {"Batchfile"}, ".bat": {"Batchfile"},
".bats": {"Shell"}, ".bats": {"Shell"},
".bb": {"BlitzBasic", "BitBake"}, ".bb": {"BitBake", "BlitzBasic"},
".bbx": {"TeX"}, ".bbx": {"TeX"},
".befunge": {"Befunge"}, ".befunge": {"Befunge"},
".bf": {"Brainfuck", "HyPhy"}, ".bf": {"Brainfuck", "HyPhy"},
@ -131,7 +131,7 @@ var languagesByExtension = map[string][]string{
".cfg": {"INI"}, ".cfg": {"INI"},
".cfm": {"ColdFusion"}, ".cfm": {"ColdFusion"},
".cfml": {"ColdFusion"}, ".cfml": {"ColdFusion"},
".cgi": {"Python", "Perl", "Shell"}, ".cgi": {"Perl", "Python", "Shell"},
".ch": {"Charity", "xBase"}, ".ch": {"Charity", "xBase"},
".chem": {"Pic"}, ".chem": {"Pic"},
".chpl": {"Chapel"}, ".chpl": {"Chapel"},
@ -139,7 +139,7 @@ var languagesByExtension = map[string][]string{
".cirru": {"Cirru"}, ".cirru": {"Cirru"},
".cjsx": {"CoffeeScript"}, ".cjsx": {"CoffeeScript"},
".ck": {"ChucK"}, ".ck": {"ChucK"},
".cl": {"Common Lisp", "OpenCL", "Cool"}, ".cl": {"Common Lisp", "Cool", "OpenCL"},
".cl2": {"Clojure"}, ".cl2": {"Clojure"},
".click": {"Click"}, ".click": {"Click"},
".clixml": {"XML"}, ".clixml": {"XML"},
@ -150,7 +150,7 @@ var languagesByExtension = map[string][]string{
".cljscm": {"Clojure"}, ".cljscm": {"Clojure"},
".cljx": {"Clojure"}, ".cljx": {"Clojure"},
".clp": {"CLIPS"}, ".clp": {"CLIPS"},
".cls": {"Apex", "TeX", "Visual Basic", "OpenEdge ABL"}, ".cls": {"Apex", "OpenEdge ABL", "TeX", "Visual Basic"},
".clw": {"Clarion"}, ".clw": {"Clarion"},
".cmake": {"CMake"}, ".cmake": {"CMake"},
".cmake.in": {"CMake"}, ".cmake.in": {"CMake"},
@ -161,7 +161,7 @@ var languagesByExtension = map[string][]string{
".com": {"DIGITAL Command Language"}, ".com": {"DIGITAL Command Language"},
".command": {"Shell"}, ".command": {"Shell"},
".coq": {"Coq"}, ".coq": {"Coq"},
".cp": {"Component Pascal", "C++"}, ".cp": {"C++", "Component Pascal"},
".cpp": {"C++"}, ".cpp": {"C++"},
".cpp-objdump": {"Cpp-ObjDump"}, ".cpp-objdump": {"Cpp-ObjDump"},
".cppobjdump": {"Cpp-ObjDump"}, ".cppobjdump": {"Cpp-ObjDump"},
@ -189,7 +189,7 @@ var languagesByExtension = map[string][]string{
".cxx": {"C++"}, ".cxx": {"C++"},
".cxx-objdump": {"Cpp-ObjDump"}, ".cxx-objdump": {"Cpp-ObjDump"},
".cy": {"Cycript"}, ".cy": {"Cycript"},
".d": {"Makefile", "D", "DTrace"}, ".d": {"D", "DTrace", "Makefile"},
".d-objdump": {"D-ObjDump"}, ".d-objdump": {"D-ObjDump"},
".dae": {"COLLADA"}, ".dae": {"COLLADA"},
".darcspatch": {"Darcs Patch"}, ".darcspatch": {"Darcs Patch"},
@ -251,13 +251,13 @@ var languagesByExtension = map[string][]string{
".erb": {"HTML+ERB"}, ".erb": {"HTML+ERB"},
".erb.deface": {"HTML+ERB"}, ".erb.deface": {"HTML+ERB"},
".erl": {"Erlang"}, ".erl": {"Erlang"},
".es": {"JavaScript", "Erlang"}, ".es": {"Erlang", "JavaScript"},
".es6": {"JavaScript"}, ".es6": {"JavaScript"},
".escript": {"Erlang"}, ".escript": {"Erlang"},
".ex": {"Elixir"}, ".ex": {"Elixir"},
".exs": {"Elixir"}, ".exs": {"Elixir"},
".eye": {"Ruby"}, ".eye": {"Ruby"},
".f": {"Fortran", "Forth", "Filebench WML"}, ".f": {"Filebench WML", "Forth", "Fortran"},
".f03": {"Fortran"}, ".f03": {"Fortran"},
".f08": {"Fortran"}, ".f08": {"Fortran"},
".f77": {"Fortran"}, ".f77": {"Fortran"},
@ -266,24 +266,24 @@ var languagesByExtension = map[string][]string{
".factor": {"Factor"}, ".factor": {"Factor"},
".fan": {"Fantom"}, ".fan": {"Fantom"},
".fancypack": {"Fancy"}, ".fancypack": {"Fancy"},
".fcgi": {"PHP", "Python", "Perl", "Shell", "Ruby", "Lua"}, ".fcgi": {"Lua", "PHP", "Perl", "Python", "Ruby", "Shell"},
".fea": {"OpenType Feature File"}, ".fea": {"OpenType Feature File"},
".feature": {"Gherkin"}, ".feature": {"Gherkin"},
".filters": {"XML"}, ".filters": {"XML"},
".fish": {"fish"}, ".fish": {"fish"},
".flex": {"JFlex"}, ".flex": {"JFlex"},
".flux": {"FLUX"}, ".flux": {"FLUX"},
".for": {"Fortran", "Formatted", "Forth"}, ".for": {"Formatted", "Forth", "Fortran"},
".forth": {"Forth"}, ".forth": {"Forth"},
".fp": {"GLSL"}, ".fp": {"GLSL"},
".fpp": {"Fortran"}, ".fpp": {"Fortran"},
".fr": {"Forth", "Frege", "Text"}, ".fr": {"Forth", "Frege", "Text"},
".frag": {"JavaScript", "GLSL"}, ".frag": {"GLSL", "JavaScript"},
".frg": {"GLSL"}, ".frg": {"GLSL"},
".frm": {"Visual Basic"}, ".frm": {"Visual Basic"},
".frt": {"Forth"}, ".frt": {"Forth"},
".frx": {"Visual Basic"}, ".frx": {"Visual Basic"},
".fs": {"F#", "Forth", "Filterscript", "GLSL"}, ".fs": {"F#", "Filterscript", "Forth", "GLSL"},
".fsh": {"GLSL"}, ".fsh": {"GLSL"},
".fshader": {"GLSL"}, ".fshader": {"GLSL"},
".fsi": {"F#"}, ".fsi": {"F#"},
@ -292,7 +292,7 @@ var languagesByExtension = map[string][]string{
".fth": {"Forth"}, ".fth": {"Forth"},
".ftl": {"FreeMarker"}, ".ftl": {"FreeMarker"},
".fun": {"Standard ML"}, ".fun": {"Standard ML"},
".fx": {"HLSL", "FLUX"}, ".fx": {"FLUX", "HLSL"},
".fxh": {"HLSL"}, ".fxh": {"HLSL"},
".fxml": {"XML"}, ".fxml": {"XML"},
".fy": {"Fancy"}, ".fy": {"Fancy"},
@ -315,7 +315,7 @@ var languagesByExtension = map[string][]string{
".glf": {"Glyph"}, ".glf": {"Glyph"},
".glsl": {"GLSL"}, ".glsl": {"GLSL"},
".glslv": {"GLSL"}, ".glslv": {"GLSL"},
".gml": {"XML", "Graph Modeling Language", "Game Maker Language"}, ".gml": {"Game Maker Language", "Graph Modeling Language", "XML"},
".gms": {"GAMS"}, ".gms": {"GAMS"},
".gn": {"GN"}, ".gn": {"GN"},
".gni": {"GN"}, ".gni": {"GN"},
@ -331,7 +331,7 @@ var languagesByExtension = map[string][]string{
".groovy": {"Groovy"}, ".groovy": {"Groovy"},
".grt": {"Groovy"}, ".grt": {"Groovy"},
".grxml": {"XML"}, ".grxml": {"XML"},
".gs": {"JavaScript", "Genie", "Gosu"}, ".gs": {"Genie", "Gosu", "JavaScript"},
".gshader": {"GLSL"}, ".gshader": {"GLSL"},
".gsp": {"Groovy Server Pages"}, ".gsp": {"Groovy Server Pages"},
".gst": {"Gosu"}, ".gst": {"Gosu"},
@ -341,7 +341,7 @@ var languagesByExtension = map[string][]string{
".gvy": {"Groovy"}, ".gvy": {"Groovy"},
".gyp": {"Python"}, ".gyp": {"Python"},
".gypi": {"Python"}, ".gypi": {"Python"},
".h": {"C++", "C", "Objective-C"}, ".h": {"C", "C++", "Objective-C"},
".h++": {"C++"}, ".h++": {"C++"},
".haml": {"Haml"}, ".haml": {"Haml"},
".haml.deface": {"Haml"}, ".haml.deface": {"Haml"},
@ -350,7 +350,7 @@ var languagesByExtension = map[string][]string{
".hb": {"Harbour"}, ".hb": {"Harbour"},
".hbs": {"Handlebars"}, ".hbs": {"Handlebars"},
".hcl": {"HCL"}, ".hcl": {"HCL"},
".hh": {"Hack", "C++"}, ".hh": {"C++", "Hack"},
".hic": {"Clojure"}, ".hic": {"Clojure"},
".hlean": {"Lean"}, ".hlean": {"Lean"},
".hlsl": {"HLSL"}, ".hlsl": {"HLSL"},
@ -378,7 +378,7 @@ var languagesByExtension = map[string][]string{
".ik": {"Ioke"}, ".ik": {"Ioke"},
".ily": {"LilyPond"}, ".ily": {"LilyPond"},
".iml": {"XML"}, ".iml": {"XML"},
".inc": {"PHP", "Assembly", "HTML", "POV-Ray SDL", "SQL", "Pascal", "C++", "SourcePawn", "PAWN"}, ".inc": {"Assembly", "C++", "HTML", "PAWN", "PHP", "POV-Ray SDL", "Pascal", "SQL", "SourcePawn"},
".ini": {"INI"}, ".ini": {"INI"},
".inl": {"C++"}, ".inl": {"C++"},
".ino": {"Arduino"}, ".ino": {"Arduino"},
@ -392,7 +392,7 @@ var languagesByExtension = map[string][]string{
".irclog": {"IRC log"}, ".irclog": {"IRC log"},
".iss": {"Inno Setup"}, ".iss": {"Inno Setup"},
".ivy": {"XML"}, ".ivy": {"XML"},
".j": {"Objective-J", "Jasmin"}, ".j": {"Jasmin", "Objective-J"},
".jade": {"Pug"}, ".jade": {"Pug"},
".jake": {"JavaScript"}, ".jake": {"JavaScript"},
".java": {"Java"}, ".java": {"Java"},
@ -425,7 +425,7 @@ var languagesByExtension = map[string][]string{
".kt": {"Kotlin"}, ".kt": {"Kotlin"},
".ktm": {"Kotlin"}, ".ktm": {"Kotlin"},
".kts": {"Kotlin"}, ".kts": {"Kotlin"},
".l": {"Common Lisp", "Roff", "PicoLisp", "Lex"}, ".l": {"Common Lisp", "Lex", "PicoLisp", "Roff"},
".lagda": {"Literate Agda"}, ".lagda": {"Literate Agda"},
".las": {"Lasso"}, ".las": {"Lasso"},
".lasso": {"Lasso"}, ".lasso": {"Lasso"},
@ -446,7 +446,7 @@ var languagesByExtension = map[string][]string{
".lid": {"Dylan"}, ".lid": {"Dylan"},
".lidr": {"Idris"}, ".lidr": {"Idris"},
".liquid": {"Liquid"}, ".liquid": {"Liquid"},
".lisp": {"NewLisp", "Common Lisp"}, ".lisp": {"Common Lisp", "NewLisp"},
".litcoffee": {"Literate CoffeeScript"}, ".litcoffee": {"Literate CoffeeScript"},
".ll": {"LLVM"}, ".ll": {"LLVM"},
".lmi": {"Python"}, ".lmi": {"Python"},
@ -457,13 +457,13 @@ var languagesByExtension = map[string][]string{
".ls": {"LiveScript", "LoomScript"}, ".ls": {"LiveScript", "LoomScript"},
".lsl": {"LSL"}, ".lsl": {"LSL"},
".lslp": {"LSL"}, ".lslp": {"LSL"},
".lsp": {"NewLisp", "Common Lisp"}, ".lsp": {"Common Lisp", "NewLisp"},
".ltx": {"TeX"}, ".ltx": {"TeX"},
".lua": {"Lua"}, ".lua": {"Lua"},
".lvproj": {"LabVIEW"}, ".lvproj": {"LabVIEW"},
".ly": {"LilyPond"}, ".ly": {"LilyPond"},
".m": {"Matlab", "M", "Limbo", "Objective-C", "Mathematica", "MUF", "Mercury"}, ".m": {"Limbo", "M", "MUF", "Mathematica", "Matlab", "Mercury", "Objective-C"},
".m4": {"M4Sugar", "M4"}, ".m4": {"M4", "M4Sugar"},
".ma": {"Mathematica"}, ".ma": {"Mathematica"},
".mak": {"Makefile"}, ".mak": {"Makefile"},
".make": {"Makefile"}, ".make": {"Makefile"},
@ -483,7 +483,7 @@ var languagesByExtension = map[string][]string{
".maxpat": {"Max"}, ".maxpat": {"Max"},
".maxproj": {"Max"}, ".maxproj": {"Max"},
".mcr": {"MAXScript"}, ".mcr": {"MAXScript"},
".md": {"Markdown", "GCC Machine Description"}, ".md": {"GCC Machine Description", "Markdown"},
".mdown": {"Markdown"}, ".mdown": {"Markdown"},
".mdpolicy": {"XML"}, ".mdpolicy": {"XML"},
".mdwn": {"Markdown"}, ".mdwn": {"Markdown"},
@ -507,19 +507,19 @@ var languagesByExtension = map[string][]string{
".mli": {"OCaml"}, ".mli": {"OCaml"},
".mll": {"OCaml"}, ".mll": {"OCaml"},
".mly": {"OCaml"}, ".mly": {"OCaml"},
".mm": {"XML", "Objective-C++"}, ".mm": {"Objective-C++", "XML"},
".mmk": {"Module Management System"}, ".mmk": {"Module Management System"},
".mms": {"Module Management System"}, ".mms": {"Module Management System"},
".mo": {"Modelica"}, ".mo": {"Modelica"},
".mod": {"XML", "Modula-2", "AMPL", "Linux Kernel Module"}, ".mod": {"AMPL", "Linux Kernel Module", "Modula-2", "XML"},
".model.lkml": {"LookML"}, ".model.lkml": {"LookML"},
".monkey": {"Monkey"}, ".monkey": {"Monkey"},
".moo": {"Moocode", "Mercury"}, ".moo": {"Mercury", "Moocode"},
".moon": {"MoonScript"}, ".moon": {"MoonScript"},
".mq4": {"MQL4"}, ".mq4": {"MQL4"},
".mq5": {"MQL5"}, ".mq5": {"MQL5"},
".mqh": {"MQL5", "MQL4"}, ".mqh": {"MQL4", "MQL5"},
".ms": {"Unix Assembly", "Roff", "MAXScript"}, ".ms": {"MAXScript", "Roff", "Unix Assembly"},
".mspec": {"Ruby"}, ".mspec": {"Ruby"},
".mss": {"CartoCSS"}, ".mss": {"CartoCSS"},
".mt": {"Mathematica"}, ".mt": {"Mathematica"},
@ -536,7 +536,7 @@ var languagesByExtension = map[string][]string{
".n": {"Nemerle", "Roff"}, ".n": {"Nemerle", "Roff"},
".nasm": {"Assembly"}, ".nasm": {"Assembly"},
".nawk": {"Awk"}, ".nawk": {"Awk"},
".nb": {"Text", "Mathematica"}, ".nb": {"Mathematica", "Text"},
".nbp": {"Mathematica"}, ".nbp": {"Mathematica"},
".nc": {"nesC"}, ".nc": {"nesC"},
".ncl": {"NCL", "Text"}, ".ncl": {"NCL", "Text"},
@ -549,7 +549,7 @@ var languagesByExtension = map[string][]string{
".nix": {"Nix"}, ".nix": {"Nix"},
".njk": {"HTML+Django"}, ".njk": {"HTML+Django"},
".njs": {"JavaScript"}, ".njs": {"JavaScript"},
".nl": {"NewLisp", "NL"}, ".nl": {"NL", "NewLisp"},
".nlogo": {"NetLogo"}, ".nlogo": {"NetLogo"},
".no": {"Text"}, ".no": {"Text"},
".nproj": {"XML"}, ".nproj": {"XML"},
@ -604,7 +604,7 @@ var languagesByExtension = map[string][]string{
".pde": {"Processing"}, ".pde": {"Processing"},
".perl": {"Perl"}, ".perl": {"Perl"},
".ph": {"Perl"}, ".ph": {"Perl"},
".php": {"PHP", "Hack"}, ".php": {"Hack", "PHP"},
".php3": {"PHP"}, ".php3": {"PHP"},
".php4": {"PHP"}, ".php4": {"PHP"},
".php5": {"PHP"}, ".php5": {"PHP"},
@ -627,7 +627,7 @@ var languagesByExtension = map[string][]string{
".pls": {"PLSQL"}, ".pls": {"PLSQL"},
".plsql": {"PLSQL"}, ".plsql": {"PLSQL"},
".plt": {"Gnuplot"}, ".plt": {"Gnuplot"},
".pluginspec": {"XML", "Ruby"}, ".pluginspec": {"Ruby", "XML"},
".plx": {"Perl"}, ".plx": {"Perl"},
".pm": {"Perl", "Perl6"}, ".pm": {"Perl", "Perl6"},
".pm6": {"Perl6"}, ".pm6": {"Perl6"},
@ -640,14 +640,14 @@ var languagesByExtension = map[string][]string{
".pony": {"Pony"}, ".pony": {"Pony"},
".pot": {"Gettext Catalog"}, ".pot": {"Gettext Catalog"},
".pov": {"POV-Ray SDL"}, ".pov": {"POV-Ray SDL"},
".pp": {"Puppet", "Pascal"}, ".pp": {"Pascal", "Puppet"},
".pprx": {"REXX"}, ".pprx": {"REXX"},
".prc": {"SQL"}, ".prc": {"SQL"},
".prefab": {"Unity3D Asset"}, ".prefab": {"Unity3D Asset"},
".prefs": {"INI"}, ".prefs": {"INI"},
".prg": {"xBase"}, ".prg": {"xBase"},
".pri": {"QMake"}, ".pri": {"QMake"},
".pro": {"IDL", "QMake", "INI", "Prolog"}, ".pro": {"IDL", "INI", "Prolog", "QMake"},
".prolog": {"Prolog"}, ".prolog": {"Prolog"},
".properties": {"INI"}, ".properties": {"INI"},
".props": {"XML"}, ".props": {"XML"},
@ -678,7 +678,7 @@ var languagesByExtension = map[string][]string{
".pyx": {"Cython"}, ".pyx": {"Cython"},
".qbs": {"QML"}, ".qbs": {"QML"},
".qml": {"QML"}, ".qml": {"QML"},
".r": {"Rebol", "R"}, ".r": {"R", "Rebol"},
".r2": {"Rebol"}, ".r2": {"Rebol"},
".r3": {"Rebol"}, ".r3": {"Rebol"},
".rabl": {"Ruby"}, ".rabl": {"Ruby"},
@ -699,7 +699,7 @@ var languagesByExtension = map[string][]string{
".rd": {"R"}, ".rd": {"R"},
".rdf": {"XML"}, ".rdf": {"XML"},
".rdoc": {"RDoc"}, ".rdoc": {"RDoc"},
".re": {"Reason", "C++"}, ".re": {"C++", "Reason"},
".reb": {"Rebol"}, ".reb": {"Rebol"},
".rebol": {"Rebol"}, ".rebol": {"Rebol"},
".red": {"Red"}, ".red": {"Red"},
@ -751,7 +751,7 @@ var languagesByExtension = map[string][]string{
".scaml": {"Scaml"}, ".scaml": {"Scaml"},
".scd": {"SuperCollider"}, ".scd": {"SuperCollider"},
".sce": {"Scilab"}, ".sce": {"Scilab"},
".sch": {"XML", "Eagle", "KiCad"}, ".sch": {"Eagle", "KiCad", "XML"},
".sci": {"Scilab"}, ".sci": {"Scilab"},
".scm": {"Scheme"}, ".scm": {"Scheme"},
".sco": {"Csound Score"}, ".sco": {"Csound Score"},
@ -782,11 +782,11 @@ var languagesByExtension = map[string][]string{
".smt2": {"SMT"}, ".smt2": {"SMT"},
".sp": {"SourcePawn"}, ".sp": {"SourcePawn"},
".sparql": {"SPARQL"}, ".sparql": {"SPARQL"},
".spec": {"Python", "Ruby", "RPM Spec"}, ".spec": {"Python", "RPM Spec", "Ruby"},
".spin": {"Propeller Spin"}, ".spin": {"Propeller Spin"},
".sps": {"Scheme"}, ".sps": {"Scheme"},
".sqf": {"SQF"}, ".sqf": {"SQF"},
".sql": {"SQLPL", "SQL", "PLpgSQL", "PLSQL"}, ".sql": {"PLSQL", "PLpgSQL", "SQL", "SQLPL"},
".sra": {"PowerBuilder"}, ".sra": {"PowerBuilder"},
".srdf": {"XML"}, ".srdf": {"XML"},
".srt": {"SRecode Template", "SubRip Text"}, ".srt": {"SRecode Template", "SubRip Text"},
@ -794,7 +794,7 @@ var languagesByExtension = map[string][]string{
".srw": {"PowerBuilder"}, ".srw": {"PowerBuilder"},
".ss": {"Scheme"}, ".ss": {"Scheme"},
".ssjs": {"JavaScript"}, ".ssjs": {"JavaScript"},
".st": {"Smalltalk", "HTML"}, ".st": {"HTML", "Smalltalk"},
".stTheme": {"XML"}, ".stTheme": {"XML"},
".stan": {"Stan"}, ".stan": {"Stan"},
".sthlp": {"Stata"}, ".sthlp": {"Stata"},
@ -822,7 +822,7 @@ var languagesByExtension = map[string][]string{
".svh": {"SystemVerilog"}, ".svh": {"SystemVerilog"},
".swift": {"Swift"}, ".swift": {"Swift"},
".syntax": {"YAML"}, ".syntax": {"YAML"},
".t": {"Turing", "Perl", "Perl6", "Terra"}, ".t": {"Perl", "Perl6", "Terra", "Turing"},
".tab": {"SQL"}, ".tab": {"SQL"},
".tac": {"Python"}, ".tac": {"Python"},
".targets": {"XML"}, ".targets": {"XML"},
@ -846,15 +846,15 @@ var languagesByExtension = map[string][]string{
".tmac": {"Roff"}, ".tmac": {"Roff"},
".tml": {"XML"}, ".tml": {"XML"},
".tmux": {"Shell"}, ".tmux": {"Shell"},
".toc": {"World of Warcraft Addon Data", "TeX"}, ".toc": {"TeX", "World of Warcraft Addon Data"},
".toml": {"TOML"}, ".toml": {"TOML"},
".tool": {"Shell"}, ".tool": {"Shell"},
".topojson": {"JSON"}, ".topojson": {"JSON"},
".tpl": {"Smarty"}, ".tpl": {"Smarty"},
".tpp": {"C++"}, ".tpp": {"C++"},
".ts": {"XML", "TypeScript"}, ".ts": {"TypeScript", "XML"},
".tst": {"GAP", "Scilab"}, ".tst": {"GAP", "Scilab"},
".tsx": {"XML", "TypeScript"}, ".tsx": {"TypeScript", "XML"},
".ttl": {"Turtle"}, ".ttl": {"Turtle"},
".tu": {"Turing"}, ".tu": {"Turing"},
".twig": {"Twig"}, ".twig": {"Twig"},