Index: lib/redmine/syntax_highlighting.rb =================================================================== --- lib/redmine/syntax_highlighting.rb (revision 16559) +++ lib/redmine/syntax_highlighting.rb (working copy) @@ -70,7 +70,10 @@ 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 Index: test/unit/helpers/application_helper_test.rb =================================================================== --- test/unit/helpers/application_helper_test.rb (revision 16559) +++ test/unit/helpers/application_helper_test.rb (working copy) @@ -1026,6 +1026,20 @@ assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') end + def test_syntax_highlight_by_coderay_alias + raw = <<-RAW +
+alert("hello, world");
+
+RAW
+
+ expected = <<-EXPECTED
+alert("hello, world");
+EXPECTED
+
+ assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '')
+ end
+
def test_to_path_param
assert_equal 'test1/test2', to_path_param('test1/test2')
assert_equal 'test1/test2', to_path_param('/test1/test2/')