Skip to content

Commit

Permalink
Remove last mentions of lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaigno committed Jan 11, 2015
1 parent 1bc6a6d commit 5d0e948
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
24 changes: 4 additions & 20 deletions lib/linguist/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def self.find_by_name(name)
# Language.find_by_alias('cpp')
# # => #<Language name="C++">
#
# Returns the Lexer or nil if none was found.
# Returns the Language or nil if none was found.
def self.find_by_alias(name)
name && @alias_index[name.downcase]
end
Expand Down Expand Up @@ -219,7 +219,7 @@ def self.find_by_interpreter(interpreter)
end


# Public: Look up Language by its name or lexer.
# Public: Look up Language by its name.
#
# name - The String name of the Language
#
Expand All @@ -243,7 +243,7 @@ def self.[](name)
#
# This list is configured in "popular.yml".
#
# Returns an Array of Lexers.
# Returns an Array of Languages.
def self.popular
@popular ||= all.select(&:popular?).sort_by { |lang| lang.name.downcase }
end
Expand All @@ -255,7 +255,7 @@ def self.popular
#
# This list is created from all the languages not listed in "popular.yml".
#
# Returns an Array of Lexers.
# Returns an Array of Languages.
def self.unpopular
@unpopular ||= all.select(&:unpopular?).sort_by { |lang| lang.name.downcase }
end
Expand Down Expand Up @@ -375,11 +375,6 @@ def initialize(attributes = {})
# Returns the name String
attr_reader :search_term

# Public: Get Lexer
#
# Returns the Lexer
attr_reader :lexer

# Public: Get the name of a TextMate-compatible scope
#
# Returns the scope
Expand Down Expand Up @@ -495,16 +490,6 @@ def searchable?
@searchable
end

# Public: Highlight syntax of text
#
# text - String of code to be highlighted
# options - A Hash of options (defaults to {})
#
# Returns html String
def colorize(text, options = {})
lexer.highlight(text, options)
end

# Public: Return name as String representation
def to_s
name
Expand Down Expand Up @@ -580,7 +565,6 @@ def inspect
:color => options['color'],
:type => options['type'],
:aliases => options['aliases'],
:lexer => options['lexer'],
:tm_scope => options['tm_scope'],
:ace_mode => options['ace_mode'],
:wrap => options['wrap'],
Expand Down
1 change: 0 additions & 1 deletion lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,6 @@ R:

RAML:
type: data
lexer: YAML
ace_mode: yaml
tm_scope: source.yaml
color: "#77d9fb"
Expand Down

0 comments on commit 5d0e948

Please sign in to comment.