mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Separate lexer and lexer_name
This commit is contained in:
@@ -10,7 +10,7 @@ module Linguist
|
||||
end
|
||||
|
||||
def self.find_by_alias(name)
|
||||
@alias_index[name.downcase]
|
||||
@alias_index[name]
|
||||
end
|
||||
|
||||
def self.[](name)
|
||||
@@ -32,7 +32,7 @@ module Linguist
|
||||
YAML.load_file(File.expand_path("../lexers.yml", __FILE__)).each do |lexer|
|
||||
@name_index[lexer.name.downcase] = lexer
|
||||
lexer.aliases.each do |name|
|
||||
@alias_index[name.downcase] = lexer
|
||||
@alias_index[name] = lexer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user