mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 13:55:52 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user