mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-29 13:21:01 +00:00
purging vestigial search term references
This commit is contained in:
@@ -265,7 +265,7 @@ module Linguist
|
|||||||
@color = attributes[:color]
|
@color = attributes[:color]
|
||||||
|
|
||||||
# Set aliases
|
# Set aliases
|
||||||
@aliases = [default_alias_name] + (attributes[:aliases] || [])
|
@aliases = [default_alias] + (attributes[:aliases] || [])
|
||||||
|
|
||||||
# Load the TextMate scope name or try to guess one
|
# Load the TextMate scope name or try to guess one
|
||||||
@tm_scope = attributes[:tm_scope] || begin
|
@tm_scope = attributes[:tm_scope] || begin
|
||||||
@@ -283,9 +283,6 @@ module Linguist
|
|||||||
@codemirror_mime_type = attributes[:codemirror_mime_type]
|
@codemirror_mime_type = attributes[:codemirror_mime_type]
|
||||||
@wrap = attributes[:wrap] || false
|
@wrap = attributes[:wrap] || false
|
||||||
|
|
||||||
# Set legacy search term
|
|
||||||
@search_term = attributes[:search_term] || default_alias_name
|
|
||||||
|
|
||||||
# Set the language_id
|
# Set the language_id
|
||||||
@language_id = attributes[:language_id]
|
@language_id = attributes[:language_id]
|
||||||
|
|
||||||
@@ -437,12 +434,13 @@ module Linguist
|
|||||||
EscapeUtils.escape_url(name).gsub('+', '%20')
|
EscapeUtils.escape_url(name).gsub('+', '%20')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Internal: Get default alias name
|
# Public: Get default alias name
|
||||||
#
|
#
|
||||||
# Returns the alias name String
|
# Returns the alias name String
|
||||||
def default_alias_name
|
def default_alias
|
||||||
name.downcase.gsub(/\s/, '-')
|
name.downcase.gsub(/\s/, '-')
|
||||||
end
|
end
|
||||||
|
alias_method :default_alias_name, :default_alias
|
||||||
|
|
||||||
# Public: Get Language group
|
# Public: Get Language group
|
||||||
#
|
#
|
||||||
@@ -557,7 +555,6 @@ module Linguist
|
|||||||
:wrap => options['wrap'],
|
:wrap => options['wrap'],
|
||||||
:group_name => options['group'],
|
:group_name => options['group'],
|
||||||
:searchable => options.fetch('searchable', true),
|
:searchable => options.fetch('searchable', true),
|
||||||
:search_term => options['search_term'],
|
|
||||||
:language_id => options['language_id'],
|
:language_id => options['language_id'],
|
||||||
:extensions => Array(options['extensions']),
|
:extensions => Array(options['extensions']),
|
||||||
:interpreters => options['interpreters'].sort,
|
:interpreters => options['interpreters'].sort,
|
||||||
|
|||||||
Reference in New Issue
Block a user