Commit 49d9f224 authored by Robert May's avatar Robert May

Further slight improvements

parent c39609c0
...@@ -24,11 +24,7 @@ module Gitlab ...@@ -24,11 +24,7 @@ module Gitlab
current_group = { commit: commit, lines: [] } current_group = { commit: commit, lines: [] }
end end
current_group[:lines] << if highlight current_group[:lines] << (highlight ? highlighted_lines[i].html_safe : line)
highlighted_lines[i].html_safe
else
line
end
prev_sha = commit.sha prev_sha = commit.sha
i += 1 i += 1
......
...@@ -40,8 +40,9 @@ module Gitlab ...@@ -40,8 +40,9 @@ module Gitlab
elsif m = /^(\w{40}) (\d+) (\d+)/.match(line) elsif m = /^(\w{40}) (\d+) (\d+)/.match(line)
# Removed these instantiations for performance but keeping them for reference: # Removed these instantiations for performance but keeping them for reference:
# commit_id, old_lineno, lineno = m[1], m[2].to_i, m[3].to_i # commit_id, old_lineno, lineno = m[1], m[2].to_i, m[3].to_i
commits[m[1]] = nil unless commits.key?(m[1]) commit_id = m[1]
info[m[3].to_i] = [m[1], m[2].to_i] commits[commit_id] = nil unless commits.key?(commit_id)
info[m[3].to_i] = [commit_id, m[2].to_i]
end end
end end
......
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