diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 07:53:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 07:53:16 +0000 |
commit | 8ba7b6a2b21cdabf9c629330b4e1919e61e279e2 (patch) | |
tree | 9da222c27e04789283cc05e5c328e9dadb3852e7 /lib | |
parent | 7634d1a380be113b94daf9726d53efe485d4f5e2 (diff) | |
download | redmine-8ba7b6a2b21cdabf9c629330b4e1919e61e279e2.tar.gz redmine-8ba7b6a2b21cdabf9c629330b4e1919e61e279e2.zip |
Highlight language aliases are no more supported (#25634).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@16568 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/syntax_highlighting.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/redmine/syntax_highlighting.rb b/lib/redmine/syntax_highlighting.rb index 7f4334977..4380627ac 100644 --- a/lib/redmine/syntax_highlighting.rb +++ b/lib/redmine/syntax_highlighting.rb @@ -70,7 +70,10 @@ module Redmine end def language_supported?(language) - ::CodeRay::Scanners.list.include?(language.to_s.downcase.to_sym) + supported_languages = + ::CodeRay::Scanners.list + + ::CodeRay::Scanners.plugin_hash.keys.map(&:to_sym) + supported_languages.include?(language.to_s.downcase.to_sym) rescue false end |