Project

General

Profile

Defect #26055 » 0003-Use-stored-ref.-to-array-holding-supported-languages.patch

Mischa The Evil, 2017-05-28 16:03

View differences:

lib/redmine/syntax_highlighting.rb
end
private_class_method :retrieve_supported_languages
SUPPORTED_LANGUAGES = retrieve_supported_languages
class << self
# Highlights +text+ as the content of +filename+
# Should not return line numbers nor outer pre tag
......
end
def language_supported?(language)
supported_languages = retrieve_supported_languages
supported_languages.include?(language.to_s.downcase.to_sym)
SUPPORTED_LANGUAGES.include?(language.to_s.downcase.to_sym)
rescue
false
end
(3-3/4)