summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-27 08:36:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-27 08:36:05 +0000
commite24ba3b90722aeaa1a6db19a6eb28a880472ebac (patch)
tree958db16d5298282e3a0ced9214b9ca9d95b59a4d /lib
parent0c19c9394fab884f5d6f3e1a4ae58eaa4f75dc91 (diff)
downloadredmine-e24ba3b90722aeaa1a6db19a6eb28a880472ebac.tar.gz
redmine-e24ba3b90722aeaa1a6db19a6eb28a880472ebac.zip
Merged r16568 (#25634).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16570 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/syntax_highlighting.rb5
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