summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 06:01:48 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 06:01:48 +0000
commitb4630c03f73276e5ae22cc1174413e51f36eaa1c (patch)
treeb9456337f86333418e5859400c65f2ac4e2dbc3c /app/helpers
parentb7ead65fde0fb813f4787e448d8c76670539a95e (diff)
downloadredmine-b4630c03f73276e5ae22cc1174413e51f36eaa1c.tar.gz
redmine-b4630c03f73276e5ae22cc1174413e51f36eaa1c.zip
Rails3: prevent double rendering file view and annotate on Rails 3.0.11 and Rails 3.1.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8d08e9d5b..8a4d387ad 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -355,6 +355,12 @@ module ApplicationHelper
end
end
+ def syntax_highlight_lines(name, content)
+ lines = []
+ syntax_highlight(name, content).each_line { |line| lines << line }
+ lines
+ end
+
def syntax_highlight(name, content)
Redmine::SyntaxHighlighting.highlight_by_filename(content, name)
end