Commit 9ad2054a authored by jplang's avatar jplang
Browse files

Use stored ref. to array holding supported languages symbols via a constant (#26055).

Patch by Mischa The Evil.

git-svn-id: https://svn.redmine.org/redmine/trunk@16624 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1fe753d6
......@@ -64,6 +64,8 @@ module Redmine
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
......@@ -79,8 +81,7 @@ module Redmine
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment