diff --git a/aliases_map.go b/aliases_map.go index bea090c..6e50dfd 100644 --- a/aliases_map.go +++ b/aliases_map.go @@ -107,6 +107,7 @@ var languagesByAlias = map[string]string{ "clipper": "xBase", "clips": "CLIPS", "clojure": "Clojure", + "closure_templates": "Closure Templates", "cmake": "CMake", "cobol": "COBOL", "coffee": "CoffeeScript", @@ -137,6 +138,7 @@ var languagesByAlias = map[string]string{ "csv": "CSV", "cucumber": "Gherkin", "cuda": "Cuda", + "cweb": "CWeb", "cycript": "Cycript", "cython": "Cython", "d": "D", @@ -281,6 +283,7 @@ var languagesByAlias = map[string]string{ "jflex": "JFlex", "jison": "Jison", "jison_lex": "Jison Lex", + "jolie": "Jolie", "jruby": "Ruby", "js": "JavaScript", "json": "JSON", @@ -433,6 +436,7 @@ var languagesByAlias = map[string]string{ "pascal": "Pascal", "pasm": "Parrot Assembly", "pawn": "PAWN", + "pep8": "Pep8", "perl": "Perl", "perl6": "Perl6", "php": "PHP", @@ -529,6 +533,7 @@ var languagesByAlias = map[string]string{ "scss": "SCSS", "self": "Self", "sh": "Shell", + "shaderlab": "ShaderLab", "shell": "Shell", "shell-script": "Shell", "shellsession": "ShellSession", diff --git a/content.go b/content.go index 2cef019..8a3b358 100644 --- a/content.go +++ b/content.go @@ -117,8 +117,8 @@ var matchers = map[string]languageMatcher{ return "Forth", true } else if f_FilebenchWML_Matcher_0.Match(i) { return "Filebench WML", true - } else if f_FORTRAN_Matcher_0.Match(i) { - return "FORTRAN", true + } else if f_Fortran_Matcher_0.Match(i) { + return "Fortran", true } return OtherLanguage, false @@ -126,8 +126,8 @@ var matchers = map[string]languageMatcher{ ".for": func(i []byte) (string, bool) { if for_Forth_Matcher_0.Match(i) { return "Forth", true - } else if for_FORTRAN_Matcher_0.Match(i) { - return "FORTRAN", true + } else if for_Fortran_Matcher_0.Match(i) { + return "Fortran", true } return OtherLanguage, false @@ -184,8 +184,8 @@ var matchers = map[string]languageMatcher{ return "Common Lisp", true } else if l_Lex_Matcher_0.Match(i) { return "Lex", true - } else if l_Groff_Matcher_0.Match(i) { - return "Groff", true + } else if l_Roff_Matcher_0.Match(i) { + return "Roff", true } else if l_PicoLisp_Matcher_0.Match(i) { return "PicoLisp", true } @@ -239,8 +239,8 @@ var matchers = map[string]languageMatcher{ ".md": func(i []byte) (string, bool) { if md_Markdown_Matcher_0.Match(i) || md_Markdown_Matcher_1.Match(i) { return "Markdown", true - } else if md_GCCmachinedescription_Matcher_0.Match(i) { - return "GCC machine description", true + } else if md_GCCMachineDescription_Matcher_0.Match(i) { + return "GCC Machine Description", true } return "Markdown", true @@ -264,15 +264,15 @@ var matchers = map[string]languageMatcher{ return "Linux Kernel Module", false }, ".ms": func(i []byte) (string, bool) { - if ms_Groff_Matcher_0.Match(i) { - return "Groff", true + if ms_Roff_Matcher_0.Match(i) { + return "Roff", true } return "MAXScript", true }, ".n": func(i []byte) (string, bool) { - if n_Groff_Matcher_0.Match(i) { - return "Groff", true + if n_Roff_Matcher_0.Match(i) { + return "Roff", true } else if n_Nemerle_Matcher_0.Match(i) { return "Nemerle", true } @@ -314,19 +314,10 @@ var matchers = map[string]languageMatcher{ return OtherLanguage, false }, ".pm": func(i []byte) (string, bool) { - if pm_Perl_Matcher_0.Match(i) { - return "Perl", true - } else if pm_Perl6_Matcher_0.Match(i) { + if pm_Perl6_Matcher_0.Match(i) { return "Perl6", true - } - - return OtherLanguage, false - }, - ".t": func(i []byte) (string, bool) { - if t_Perl_Matcher_0.Match(i) { + } else if pm_Perl_Matcher_0.Match(i) { return "Perl", true - } else if t_Perl6_Matcher_0.Match(i) { - return "Perl6", true } return OtherLanguage, false @@ -372,8 +363,8 @@ var matchers = map[string]languageMatcher{ ".rno": func(i []byte) (string, bool) { if rno_RUNOFF_Matcher_0.Match(i) { return "RUNOFF", true - } else if rno_Groff_Matcher_0.Match(i) { - return "Groff", true + } else if rno_Roff_Matcher_0.Match(i) { + return "Roff", true } return OtherLanguage, false @@ -423,6 +414,17 @@ var matchers = map[string]languageMatcher{ return OtherLanguage, false }, + ".t": func(i []byte) (string, bool) { + if t_Turing_Matcher_0.Match(i) { + return "Turing", true + } else if t_Perl6_Matcher_0.Match(i) { + return "Perl6", true + } else if t_Perl_Matcher_0.Match(i) { + return "Perl", true + } + + return OtherLanguage, false + }, ".toc": func(i []byte) (string, bool) { if toc_WorldofWarcraftAddonData_Matcher_0.Match(i) { return "World of Warcraft Addon Data", true @@ -481,9 +483,9 @@ var ( es_Erlang_Matcher_0 = regexp.MustCompile(`(?m)^\s*(?:%%|main\s*\(.*?\)\s*->)`) f_Forth_Matcher_0 = regexp.MustCompile(`(?m)^: `) f_FilebenchWML_Matcher_0 = regexp.MustCompile(`(?m)flowop`) - f_FORTRAN_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`) + f_Fortran_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`) for_Forth_Matcher_0 = regexp.MustCompile(`(?m)^: `) - for_FORTRAN_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`) + for_Fortran_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`) fr_Forth_Matcher_0 = regexp.MustCompile(`(?m)^(: |also |new-device|previous )`) fr_Frege_Matcher_0 = regexp.MustCompile(`(?m)^\s*(import|module|package|data|type) `) fs_Forth_Matcher_0 = regexp.MustCompile(`(?m)^(: |new-device)`) @@ -503,7 +505,7 @@ var ( inc_POVDashRaySDL_Matcher_0 = regexp.MustCompile(`(?m)^\s*#(declare|local|macro|while)\s`) l_CommonLisp_Matcher_0 = regexp.MustCompile(`(?m)\(def(un|macro)\s`) l_Lex_Matcher_0 = regexp.MustCompile(`(?m)^(%[%{}]xs|<.*>)`) - l_Groff_Matcher_0 = regexp.MustCompile(`(?mi)^\.[a-z][a-z](\s|$)`) + l_Roff_Matcher_0 = regexp.MustCompile(`(?mi)^\.[a-z][a-z](\s|$)`) l_PicoLisp_Matcher_0 = regexp.MustCompile(`(?m)^\((de|class|rel|code|data|must)\s`) ls_LoomScript_Matcher_0 = regexp.MustCompile(`(?m)^\s*package\s*[\w\.\/\*\s]*\s*{`) lsp_CommonLisp_Matcher_0 = regexp.MustCompile(`(?mi)^\s*\((defun|in-package|defpackage) `) @@ -519,14 +521,14 @@ var ( m_Limbo_Matcher_0 = regexp.MustCompile(`(?m)^\w+\s*:\s*module\s*{`) md_Markdown_Matcher_0 = regexp.MustCompile(`(?mi)(^[-a-z0-9=#!\*\[|>])|<\/`) md_Markdown_Matcher_1 = regexp.MustCompile(`(?m)^$`) - md_GCCmachinedescription_Matcher_0 = regexp.MustCompile(`(?m)^(;;|\(define_)`) + md_GCCMachineDescription_Matcher_0 = regexp.MustCompile(`(?m)^(;;|\(define_)`) ml_OCaml_Matcher_0 = regexp.MustCompile(`(?m)(^\s*module)|let rec |match\s+(\S+\s)+with`) ml_StandardML_Matcher_0 = regexp.MustCompile(`(?m)=> |case\s+(\S+\s)+of`) mod_XML_Matcher_0 = regexp.MustCompile(`(?m))\s*(\d{2}:\d{2}:\d{2},\d{3})$`) + t_Turing_Matcher_0 = regexp.MustCompile(`(?m)^\s*%[ \t]+|^\s*var\s+\w+\s*:=\s*\w+`) + t_Perl6_Matcher_0 = regexp.MustCompile(`(?m)^\s*(?:use\s+v6\s*;|\bmodule\b|\b(?:my\s+)?class\b)`) + t_Perl_Matcher_0 = regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`) toc_WorldofWarcraftAddonData_Matcher_0 = regexp.MustCompile(`(?m)^## |@no-lib-strip@`) toc_TeX_Matcher_0 = regexp.MustCompile(`(?m)^\\(contentsline|defcounter|beamer|boolfalse)`) ts_XML_Matcher_0 = regexp.MustCompile(`(?m)