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

Further slight improvements

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