Separate lexer and lexer_name

This commit is contained in:
Joshua Peek
2011-05-19 23:45:34 -05:00
parent 7b45e5c9f5
commit 0f0f6d282b
7 changed files with 68 additions and 30 deletions

View File

@@ -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