summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 5663cc6d6..321d19007 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -15,8 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-require 'coderay'
-require 'coderay/helpers/file_type'
require 'forwardable'
require 'cgi'
@@ -284,8 +282,7 @@ module ApplicationHelper
end
def syntax_highlight(name, content)
- type = CodeRay::FileType[name]
- type ? CodeRay.scan(content, type).html : h(content)
+ Redmine::SyntaxHighlighting.highlight_by_filename(content, name)
end
def to_path_param(path)