Commit 9a7c1352 authored by Robert May's avatar Robert May

Reduce object generation in HTMLGitlab

Modifies the token values in place rather than generate a new
string for every single token on every line.
parent 35a91936
......@@ -20,7 +20,7 @@ module Rouge
is_first = false
yield %(<span id="LC#{@line_number}" class="line" lang="#{@tag}">)
line.each { |token, value| yield span(token, value.chomp) }
line.each { |token, value| yield span(token, value.chomp! || value) }
yield %(</span>)
@line_number += 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment