From 5d0e9484ce9a3c1ae22637cfc61bda088a74c315 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 11 Jan 2015 10:02:52 +0100 Subject: [PATCH 1/2] Remove last mentions of lexer --- lib/linguist/language.rb | 24 ++++-------------------- lib/linguist/languages.yml | 1 - 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 5f1808ce..365beb06 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -155,7 +155,7 @@ module Linguist # Language.find_by_alias('cpp') # # => # # - # 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 @@ -219,7 +219,7 @@ module Linguist end - # Public: Look up Language by its name or lexer. + # Public: Look up Language by its name. # # name - The String name of the Language # @@ -243,7 +243,7 @@ module Linguist # # 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 @@ -255,7 +255,7 @@ module Linguist # # 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 @@ -375,11 +375,6 @@ module Linguist # 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 @@ -495,16 +490,6 @@ module Linguist @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 @@ -580,7 +565,6 @@ module Linguist :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'], diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 77da5506..be4de69d 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2421,7 +2421,6 @@ R: RAML: type: data - lexer: YAML ace_mode: yaml tm_scope: source.yaml color: "#77d9fb" From 4f37563be149308cec0315848e61443644b87c9b Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 24 Jan 2015 01:02:58 +0100 Subject: [PATCH 2/2] Remove mention of lexer for GAP in languages.yml --- lib/linguist/languages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4a011e87..63578295 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -951,7 +951,6 @@ GAMS: GAP: type: programming - lexer: GAP extensions: - .g - .gap