mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-29 05:11:00 +00:00
Merge pull request #1675 from github/more-aliases
Pull in aliases and file extensions from Pygments
This commit is contained in:
@@ -62,7 +62,7 @@ module Linguist
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Language name index
|
# Language name index
|
||||||
@index[language.name] = @name_index[language.name] = language
|
@index[language.name.downcase] = @name_index[language.name.downcase] = language
|
||||||
|
|
||||||
language.aliases.each do |name|
|
language.aliases.each do |name|
|
||||||
# All Language aliases should be unique. Raise if there is a duplicate.
|
# All Language aliases should be unique. Raise if there is a duplicate.
|
||||||
@@ -70,7 +70,7 @@ module Linguist
|
|||||||
raise ArgumentError, "Duplicate alias: #{name}"
|
raise ArgumentError, "Duplicate alias: #{name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@index[name] = @alias_index[name] = language
|
@index[name.downcase] = @alias_index[name.downcase] = language
|
||||||
end
|
end
|
||||||
|
|
||||||
language.extensions.each do |extension|
|
language.extensions.each do |extension|
|
||||||
@@ -164,7 +164,7 @@ module Linguist
|
|||||||
#
|
#
|
||||||
# Returns the Language or nil if none was found.
|
# Returns the Language or nil if none was found.
|
||||||
def self.find_by_name(name)
|
def self.find_by_name(name)
|
||||||
@name_index[name]
|
@name_index[name.downcase]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: Look up Language by one of its aliases.
|
# Public: Look up Language by one of its aliases.
|
||||||
@@ -178,7 +178,7 @@ module Linguist
|
|||||||
#
|
#
|
||||||
# Returns the Lexer or nil if none was found.
|
# Returns the Lexer or nil if none was found.
|
||||||
def self.find_by_alias(name)
|
def self.find_by_alias(name)
|
||||||
@alias_index[name]
|
@alias_index[name.downcase]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: Look up Languages by filename.
|
# Public: Look up Languages by filename.
|
||||||
@@ -227,7 +227,7 @@ module Linguist
|
|||||||
#
|
#
|
||||||
# Returns the Language or nil if none was found.
|
# Returns the Language or nil if none was found.
|
||||||
def self.[](name)
|
def self.[](name)
|
||||||
@index[name]
|
@index[name.downcase]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: A List of popular languages
|
# Public: A List of popular languages
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ ActionScript:
|
|||||||
color: "#e3491a"
|
color: "#e3491a"
|
||||||
search_term: as3
|
search_term: as3
|
||||||
aliases:
|
aliases:
|
||||||
|
- actionscript 3
|
||||||
|
- actionscript3
|
||||||
- as3
|
- as3
|
||||||
extensions:
|
extensions:
|
||||||
- .as
|
- .as
|
||||||
@@ -99,7 +101,10 @@ Ada:
|
|||||||
color: "#02f88c"
|
color: "#02f88c"
|
||||||
extensions:
|
extensions:
|
||||||
- .adb
|
- .adb
|
||||||
|
- .ada
|
||||||
- .ads
|
- .ads
|
||||||
|
aliases:
|
||||||
|
- ada95ada2005
|
||||||
|
|
||||||
Agda:
|
Agda:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -117,9 +122,11 @@ Alloy:
|
|||||||
ApacheConf:
|
ApacheConf:
|
||||||
type: markup
|
type: markup
|
||||||
aliases:
|
aliases:
|
||||||
|
- aconf
|
||||||
- apache
|
- apache
|
||||||
extensions:
|
extensions:
|
||||||
- .apacheconf
|
- .apacheconf
|
||||||
|
- .conf
|
||||||
tm_scope: source.apache-config
|
tm_scope: source.apache-config
|
||||||
|
|
||||||
Apex:
|
Apex:
|
||||||
@@ -180,6 +187,7 @@ Assembly:
|
|||||||
- nasm
|
- nasm
|
||||||
extensions:
|
extensions:
|
||||||
- .asm
|
- .asm
|
||||||
|
- .ASM
|
||||||
- .a51
|
- .a51
|
||||||
tm_scope: source.asm.x86
|
tm_scope: source.asm.x86
|
||||||
|
|
||||||
@@ -196,6 +204,7 @@ AutoHotkey:
|
|||||||
- ahk
|
- ahk
|
||||||
extensions:
|
extensions:
|
||||||
- .ahk
|
- .ahk
|
||||||
|
- .ahkl
|
||||||
|
|
||||||
AutoIt:
|
AutoIt:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -229,6 +238,9 @@ Batchfile:
|
|||||||
search_term: bat
|
search_term: bat
|
||||||
aliases:
|
aliases:
|
||||||
- bat
|
- bat
|
||||||
|
- batch
|
||||||
|
- dosbatch
|
||||||
|
- winbatch
|
||||||
extensions:
|
extensions:
|
||||||
- .bat
|
- .bat
|
||||||
- .cmd
|
- .cmd
|
||||||
@@ -241,8 +253,10 @@ Befunge:
|
|||||||
BlitzBasic:
|
BlitzBasic:
|
||||||
type: programming
|
type: programming
|
||||||
aliases:
|
aliases:
|
||||||
- blitzplus
|
- b3d
|
||||||
- blitz3d
|
- blitz3d
|
||||||
|
- blitzplus
|
||||||
|
- bplus
|
||||||
extensions:
|
extensions:
|
||||||
- .bb
|
- .bb
|
||||||
- .decls
|
- .decls
|
||||||
@@ -253,6 +267,8 @@ BlitzMax:
|
|||||||
color: "#cd6400"
|
color: "#cd6400"
|
||||||
extensions:
|
extensions:
|
||||||
- .bmx
|
- .bmx
|
||||||
|
aliases:
|
||||||
|
- bmax
|
||||||
|
|
||||||
Bluespec:
|
Bluespec:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -291,6 +307,7 @@ C:
|
|||||||
- .c
|
- .c
|
||||||
- .cats
|
- .cats
|
||||||
- .h
|
- .h
|
||||||
|
- .idc
|
||||||
- .w
|
- .w
|
||||||
|
|
||||||
C#:
|
C#:
|
||||||
@@ -316,19 +333,20 @@ C++:
|
|||||||
extensions:
|
extensions:
|
||||||
- .cpp
|
- .cpp
|
||||||
- .C
|
- .C
|
||||||
|
- .CPP
|
||||||
|
- .H
|
||||||
- .c++
|
- .c++
|
||||||
- .cc
|
- .cc
|
||||||
- .cxx
|
- .cxx
|
||||||
- .H
|
|
||||||
- .h
|
- .h
|
||||||
- .h++
|
- .h++
|
||||||
- .hh
|
- .hh
|
||||||
- .hpp
|
- .hpp
|
||||||
- .hxx
|
- .hxx
|
||||||
- .inl
|
- .inl
|
||||||
|
- .ipp
|
||||||
- .tcc
|
- .tcc
|
||||||
- .tpp
|
- .tpp
|
||||||
- .ipp
|
|
||||||
|
|
||||||
C-ObjDump:
|
C-ObjDump:
|
||||||
type: data
|
type: data
|
||||||
@@ -364,6 +382,8 @@ COBOL:
|
|||||||
type: programming
|
type: programming
|
||||||
extensions:
|
extensions:
|
||||||
- .cob
|
- .cob
|
||||||
|
- .COB
|
||||||
|
- .CPY
|
||||||
- .cbl
|
- .cbl
|
||||||
- .ccp
|
- .ccp
|
||||||
- .cobol
|
- .cobol
|
||||||
@@ -455,8 +475,10 @@ ColdFusion:
|
|||||||
aliases:
|
aliases:
|
||||||
- cfm
|
- cfm
|
||||||
- cfml
|
- cfml
|
||||||
|
- coldfusion html
|
||||||
extensions:
|
extensions:
|
||||||
- .cfm
|
- .cfm
|
||||||
|
- .cfml
|
||||||
tm_scope: text.html.cfm
|
tm_scope: text.html.cfm
|
||||||
|
|
||||||
ColdFusion CFC:
|
ColdFusion CFC:
|
||||||
@@ -500,6 +522,9 @@ Component Pascal:
|
|||||||
- .cp
|
- .cp
|
||||||
- .cps
|
- .cps
|
||||||
tm_scope: source.pascal
|
tm_scope: source.pascal
|
||||||
|
aliases:
|
||||||
|
- delphi
|
||||||
|
- objectpascal
|
||||||
|
|
||||||
Coq:
|
Coq:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -512,9 +537,13 @@ Cpp-ObjDump:
|
|||||||
lexer: cpp-objdump
|
lexer: cpp-objdump
|
||||||
extensions:
|
extensions:
|
||||||
- .cppobjdump
|
- .cppobjdump
|
||||||
|
- .c++-objdump
|
||||||
- .c++objdump
|
- .c++objdump
|
||||||
|
- .cpp-objdump
|
||||||
- .cxx-objdump
|
- .cxx-objdump
|
||||||
tm_scope: objdump.x86asm
|
tm_scope: objdump.x86asm
|
||||||
|
aliases:
|
||||||
|
- c++-objdumb
|
||||||
|
|
||||||
Creole:
|
Creole:
|
||||||
type: prose
|
type: prose
|
||||||
@@ -536,6 +565,8 @@ Cucumber:
|
|||||||
extensions:
|
extensions:
|
||||||
- .feature
|
- .feature
|
||||||
tm_scope: text.gherkin.feature
|
tm_scope: text.gherkin.feature
|
||||||
|
aliases:
|
||||||
|
- gherkin
|
||||||
|
|
||||||
Cuda:
|
Cuda:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -559,6 +590,8 @@ Cython:
|
|||||||
- .pyx
|
- .pyx
|
||||||
- .pxd
|
- .pxd
|
||||||
- .pxi
|
- .pxi
|
||||||
|
aliases:
|
||||||
|
- pyrex
|
||||||
|
|
||||||
D:
|
D:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -609,6 +642,8 @@ Diff:
|
|||||||
extensions:
|
extensions:
|
||||||
- .diff
|
- .diff
|
||||||
- .patch
|
- .patch
|
||||||
|
aliases:
|
||||||
|
- udiff
|
||||||
|
|
||||||
Dogescript:
|
Dogescript:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -622,6 +657,7 @@ Dylan:
|
|||||||
color: "#3ebc27"
|
color: "#3ebc27"
|
||||||
extensions:
|
extensions:
|
||||||
- .dylan
|
- .dylan
|
||||||
|
- .dyl
|
||||||
- .intr
|
- .intr
|
||||||
- .lid
|
- .lid
|
||||||
|
|
||||||
@@ -706,6 +742,7 @@ Erlang:
|
|||||||
color: "#0faf8d"
|
color: "#0faf8d"
|
||||||
extensions:
|
extensions:
|
||||||
- .erl
|
- .erl
|
||||||
|
- .es
|
||||||
- .escript
|
- .escript
|
||||||
- .hrl
|
- .hrl
|
||||||
|
|
||||||
@@ -848,6 +885,7 @@ GLSL:
|
|||||||
- .frag
|
- .frag
|
||||||
- .frg
|
- .frg
|
||||||
- .fshader
|
- .fshader
|
||||||
|
- .geo
|
||||||
- .geom
|
- .geom
|
||||||
- .glslv
|
- .glslv
|
||||||
- .gshader
|
- .gshader
|
||||||
@@ -860,6 +898,9 @@ Genshi:
|
|||||||
extensions:
|
extensions:
|
||||||
- .kid
|
- .kid
|
||||||
tm_scope: text.xml.genshi
|
tm_scope: text.xml.genshi
|
||||||
|
aliases:
|
||||||
|
- xml+genshi
|
||||||
|
- xml+kid
|
||||||
|
|
||||||
Gentoo Ebuild:
|
Gentoo Ebuild:
|
||||||
group: Shell
|
group: Shell
|
||||||
@@ -955,6 +996,8 @@ Groff:
|
|||||||
- '.6'
|
- '.6'
|
||||||
- '.7'
|
- '.7'
|
||||||
tm_scope: text.groff
|
tm_scope: text.groff
|
||||||
|
aliases:
|
||||||
|
- nroff
|
||||||
|
|
||||||
Groovy:
|
Groovy:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -973,6 +1016,7 @@ Groovy Server Pages:
|
|||||||
lexer: Java Server Page
|
lexer: Java Server Page
|
||||||
aliases:
|
aliases:
|
||||||
- gsp
|
- gsp
|
||||||
|
- java server page
|
||||||
extensions:
|
extensions:
|
||||||
- .gsp
|
- .gsp
|
||||||
tm_scope: text.html.jsp
|
tm_scope: text.html.jsp
|
||||||
@@ -997,6 +1041,10 @@ HTML+Django:
|
|||||||
extensions:
|
extensions:
|
||||||
- .mustache
|
- .mustache
|
||||||
- .jinja
|
- .jinja
|
||||||
|
aliases:
|
||||||
|
- html+django/jinja
|
||||||
|
- html+jinja
|
||||||
|
- htmldjango
|
||||||
|
|
||||||
HTML+ERB:
|
HTML+ERB:
|
||||||
type: markup
|
type: markup
|
||||||
@@ -1076,6 +1124,8 @@ Hy:
|
|||||||
color: "#7891b1"
|
color: "#7891b1"
|
||||||
extensions:
|
extensions:
|
||||||
- .hy
|
- .hy
|
||||||
|
aliases:
|
||||||
|
- hylang
|
||||||
|
|
||||||
IDL:
|
IDL:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1090,14 +1140,20 @@ IGOR Pro:
|
|||||||
lexer: Igor
|
lexer: Igor
|
||||||
extensions:
|
extensions:
|
||||||
- .ipf
|
- .ipf
|
||||||
|
aliases:
|
||||||
|
- igor
|
||||||
|
- igorpro
|
||||||
|
|
||||||
INI:
|
INI:
|
||||||
type: data
|
type: data
|
||||||
extensions:
|
extensions:
|
||||||
- .ini
|
- .ini
|
||||||
|
- .cfg
|
||||||
- .prefs
|
- .prefs
|
||||||
- .properties
|
- .properties
|
||||||
tm_scope: source.ini
|
tm_scope: source.ini
|
||||||
|
aliases:
|
||||||
|
- dosini
|
||||||
|
|
||||||
Inno Setup:
|
Inno Setup:
|
||||||
extensions:
|
extensions:
|
||||||
@@ -1119,6 +1175,9 @@ Inform 7:
|
|||||||
- .ni
|
- .ni
|
||||||
- .i7x
|
- .i7x
|
||||||
tm_scope: source.inform
|
tm_scope: source.inform
|
||||||
|
aliases:
|
||||||
|
- i7
|
||||||
|
- inform7
|
||||||
|
|
||||||
Inno Setup:
|
Inno Setup:
|
||||||
extensions:
|
extensions:
|
||||||
@@ -1130,6 +1189,7 @@ IRC log:
|
|||||||
search_term: irc
|
search_term: irc
|
||||||
aliases:
|
aliases:
|
||||||
- irc
|
- irc
|
||||||
|
- irc logs
|
||||||
extensions:
|
extensions:
|
||||||
- .irclog
|
- .irclog
|
||||||
- .weechatlog
|
- .weechatlog
|
||||||
@@ -1330,9 +1390,12 @@ Lasso:
|
|||||||
extensions:
|
extensions:
|
||||||
- .lasso
|
- .lasso
|
||||||
- .las
|
- .las
|
||||||
|
- .lasso8
|
||||||
- .lasso9
|
- .lasso9
|
||||||
- .ldml
|
- .ldml
|
||||||
tm_scope: file.lasso
|
tm_scope: file.lasso
|
||||||
|
aliases:
|
||||||
|
- lassoscript
|
||||||
|
|
||||||
Latte:
|
Latte:
|
||||||
type: markup
|
type: markup
|
||||||
@@ -1387,6 +1450,7 @@ Literate Haskell:
|
|||||||
group: Haskell
|
group: Haskell
|
||||||
search_term: lhs
|
search_term: lhs
|
||||||
aliases:
|
aliases:
|
||||||
|
- lhaskell
|
||||||
- lhs
|
- lhs
|
||||||
extensions:
|
extensions:
|
||||||
- .lhs
|
- .lhs
|
||||||
@@ -1397,6 +1461,7 @@ LiveScript:
|
|||||||
ace_mode: ls
|
ace_mode: ls
|
||||||
color: "#499886"
|
color: "#499886"
|
||||||
aliases:
|
aliases:
|
||||||
|
- live-script
|
||||||
- ls
|
- ls
|
||||||
extensions:
|
extensions:
|
||||||
- .ls
|
- .ls
|
||||||
@@ -1408,6 +1473,8 @@ Logos:
|
|||||||
type: programming
|
type: programming
|
||||||
extensions:
|
extensions:
|
||||||
- .xm
|
- .xm
|
||||||
|
- .x
|
||||||
|
- .xi
|
||||||
|
|
||||||
Logtalk:
|
Logtalk:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1434,6 +1501,7 @@ Lua:
|
|||||||
- .nse
|
- .nse
|
||||||
- .pd_lua
|
- .pd_lua
|
||||||
- .rbxs
|
- .rbxs
|
||||||
|
- .wlua
|
||||||
interpreters:
|
interpreters:
|
||||||
- lua
|
- lua
|
||||||
|
|
||||||
@@ -1457,7 +1525,9 @@ MTML:
|
|||||||
|
|
||||||
Makefile:
|
Makefile:
|
||||||
aliases:
|
aliases:
|
||||||
|
- bsdmake
|
||||||
- make
|
- make
|
||||||
|
- mf
|
||||||
extensions:
|
extensions:
|
||||||
- .mak
|
- .mak
|
||||||
- .mk
|
- .mk
|
||||||
@@ -1501,9 +1571,14 @@ Mathematica:
|
|||||||
type: programming
|
type: programming
|
||||||
extensions:
|
extensions:
|
||||||
- .mathematica
|
- .mathematica
|
||||||
|
- .cdf
|
||||||
- .m
|
- .m
|
||||||
|
- .ma
|
||||||
- .nb
|
- .nb
|
||||||
|
- .nbp
|
||||||
lexer: Mathematica
|
lexer: Mathematica
|
||||||
|
aliases:
|
||||||
|
- mma
|
||||||
|
|
||||||
Matlab:
|
Matlab:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1610,6 +1685,8 @@ Nginx:
|
|||||||
extensions:
|
extensions:
|
||||||
- .nginxconf
|
- .nginxconf
|
||||||
tm_scope: source.nginx
|
tm_scope: source.nginx
|
||||||
|
aliases:
|
||||||
|
- nginx configuration file
|
||||||
|
|
||||||
Nimrod:
|
Nimrod:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1630,6 +1707,8 @@ Nix:
|
|||||||
lexer: Nix
|
lexer: Nix
|
||||||
extensions:
|
extensions:
|
||||||
- .nix
|
- .nix
|
||||||
|
aliases:
|
||||||
|
- nixos
|
||||||
|
|
||||||
Nu:
|
Nu:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1677,6 +1756,7 @@ Objective-C:
|
|||||||
aliases:
|
aliases:
|
||||||
- obj-c
|
- obj-c
|
||||||
- objc
|
- objc
|
||||||
|
- objectivec
|
||||||
extensions:
|
extensions:
|
||||||
- .m
|
- .m
|
||||||
- .h
|
- .h
|
||||||
@@ -1688,6 +1768,7 @@ Objective-C++:
|
|||||||
aliases:
|
aliases:
|
||||||
- obj-c++
|
- obj-c++
|
||||||
- objc++
|
- objc++
|
||||||
|
- objectivec++
|
||||||
extensions:
|
extensions:
|
||||||
- .mm
|
- .mm
|
||||||
|
|
||||||
@@ -1696,6 +1777,8 @@ Objective-J:
|
|||||||
color: "#ff0c5a"
|
color: "#ff0c5a"
|
||||||
aliases:
|
aliases:
|
||||||
- obj-j
|
- obj-j
|
||||||
|
- objectivej
|
||||||
|
- objj
|
||||||
extensions:
|
extensions:
|
||||||
- .j
|
- .j
|
||||||
- .sj
|
- .sj
|
||||||
@@ -1795,6 +1878,8 @@ PHP:
|
|||||||
- Phakefile
|
- Phakefile
|
||||||
interpreters:
|
interpreters:
|
||||||
- php
|
- php
|
||||||
|
aliases:
|
||||||
|
- inc
|
||||||
|
|
||||||
Pan:
|
Pan:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1914,6 +1999,8 @@ PostScript:
|
|||||||
- .ps
|
- .ps
|
||||||
- .eps
|
- .eps
|
||||||
tm_scope: source.postscript
|
tm_scope: source.postscript
|
||||||
|
aliases:
|
||||||
|
- postscr
|
||||||
|
|
||||||
PowerShell:
|
PowerShell:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -1995,6 +2082,7 @@ Python:
|
|||||||
- .pyp
|
- .pyp
|
||||||
- .pyt
|
- .pyt
|
||||||
- .pyw
|
- .pyw
|
||||||
|
- .tac
|
||||||
- .wsgi
|
- .wsgi
|
||||||
- .xpy
|
- .xpy
|
||||||
filenames:
|
filenames:
|
||||||
@@ -2032,6 +2120,7 @@ R:
|
|||||||
aliases:
|
aliases:
|
||||||
- R
|
- R
|
||||||
- Rscript
|
- Rscript
|
||||||
|
- splus
|
||||||
extensions:
|
extensions:
|
||||||
- .r
|
- .r
|
||||||
- .R
|
- .R
|
||||||
@@ -2070,6 +2159,8 @@ RHTML:
|
|||||||
extensions:
|
extensions:
|
||||||
- .rhtml
|
- .rhtml
|
||||||
tm_scope: text.html.ruby
|
tm_scope: text.html.ruby
|
||||||
|
aliases:
|
||||||
|
- html+ruby
|
||||||
|
|
||||||
RMarkdown:
|
RMarkdown:
|
||||||
type: prose
|
type: prose
|
||||||
@@ -2097,6 +2188,9 @@ Ragel in Ruby Host:
|
|||||||
color: "#ff9c2e"
|
color: "#ff9c2e"
|
||||||
extensions:
|
extensions:
|
||||||
- .rl
|
- .rl
|
||||||
|
aliases:
|
||||||
|
- ragel-rb
|
||||||
|
- ragel-ruby
|
||||||
|
|
||||||
Raw token data:
|
Raw token data:
|
||||||
search_term: raw
|
search_term: raw
|
||||||
@@ -2123,6 +2217,8 @@ Red:
|
|||||||
extensions:
|
extensions:
|
||||||
- .red
|
- .red
|
||||||
- .reds
|
- .reds
|
||||||
|
aliases:
|
||||||
|
- red/system
|
||||||
|
|
||||||
Redcode:
|
Redcode:
|
||||||
extensions:
|
extensions:
|
||||||
@@ -2316,6 +2412,7 @@ Shell:
|
|||||||
- .cgi
|
- .cgi
|
||||||
- .command
|
- .command
|
||||||
- .fcgi
|
- .fcgi
|
||||||
|
- .ksh
|
||||||
- .tmux
|
- .tmux
|
||||||
- .zsh
|
- .zsh
|
||||||
interpreters:
|
interpreters:
|
||||||
@@ -2330,6 +2427,9 @@ ShellSession:
|
|||||||
lexer: Bash Session
|
lexer: Bash Session
|
||||||
extensions:
|
extensions:
|
||||||
- .sh-session
|
- .sh-session
|
||||||
|
aliases:
|
||||||
|
- bash session
|
||||||
|
- console
|
||||||
|
|
||||||
Shen:
|
Shen:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -2358,6 +2458,8 @@ Smalltalk:
|
|||||||
color: "#596706"
|
color: "#596706"
|
||||||
extensions:
|
extensions:
|
||||||
- .st
|
- .st
|
||||||
|
aliases:
|
||||||
|
- squeak
|
||||||
|
|
||||||
Smarty:
|
Smarty:
|
||||||
extensions:
|
extensions:
|
||||||
@@ -2612,6 +2714,9 @@ Visual Basic:
|
|||||||
- .vbhtml
|
- .vbhtml
|
||||||
- .vbs
|
- .vbs
|
||||||
tm_scope: source.vbnet
|
tm_scope: source.vbnet
|
||||||
|
aliases:
|
||||||
|
- vb.net
|
||||||
|
- vbnet
|
||||||
|
|
||||||
Volt:
|
Volt:
|
||||||
type: programming
|
type: programming
|
||||||
@@ -2682,6 +2787,7 @@ XML:
|
|||||||
- .vcxproj
|
- .vcxproj
|
||||||
- .vxml
|
- .vxml
|
||||||
- .wsdl
|
- .wsdl
|
||||||
|
- .wsf
|
||||||
- .wxi
|
- .wxi
|
||||||
- .wxl
|
- .wxl
|
||||||
- .wxs
|
- .wxs
|
||||||
|
|||||||
@@ -303,6 +303,21 @@ class TestLanguage < Test::Unit::TestCase
|
|||||||
assert_nil Language['defunkt']
|
assert_nil Language['defunkt']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_find_ignores_case
|
||||||
|
assert_equal 'AGS Script', Language['ags script'].name
|
||||||
|
assert_equal 'AGS Script', Language['ags sCRIPT'].name
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_find_by_name_ignores_case
|
||||||
|
assert_equal 'AGS Script', Language.find_by_name('ags script').name
|
||||||
|
assert_equal 'AGS Script', Language.find_by_name('ags sCRIPT').name
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_find_by_alias_ignores_case
|
||||||
|
refute_includes Language['AGS Script'].aliases, 'AGS'
|
||||||
|
assert_equal 'AGS Script', Language.find_by_alias('AGS').name
|
||||||
|
end
|
||||||
|
|
||||||
def test_name
|
def test_name
|
||||||
assert_equal 'Perl', Language['Perl'].name
|
assert_equal 'Perl', Language['Perl'].name
|
||||||
assert_equal 'Python', Language['Python'].name
|
assert_equal 'Python', Language['Python'].name
|
||||||
|
|||||||
Reference in New Issue
Block a user