Browse Source

Remove iteration in ApplicationHelper#syntax_highlight_lines (#24713).

Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16164 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.4.0
Jean-Philippe Lang 7 years ago
parent
commit
e5d15c031b
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      app/helpers/application_helper.rb

+ 1
- 3
app/helpers/application_helper.rb View File

@@ -466,9 +466,7 @@ module ApplicationHelper
end

def syntax_highlight_lines(name, content)
lines = []
syntax_highlight(name, content).each_line { |line| lines << line }
lines
syntax_highlight(name, content).each_line.to_a
end

def syntax_highlight(name, content)

Loading…
Cancel
Save