Skip to content

Commit 9e6d071

Browse files
committed
Merge pull request gitlabhq#443 from CedricGatay/fix/incorrectLineNumberingInDiff
Incorrect line numbering in diff
2 parents 8c40aab + 6ea87c4 commit 9e6d071

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/helpers/commits_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def each_diff_line(diff_arr, index)
6161
full_line = html_escape(line.gsub(/\n/, '')).force_encoding("UTF-8")
6262

6363
if line.match(/^@@ -/)
64-
next if line_old == 1 && line_new == 1
6564
type = "match"
6665

6766
line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0
6867
line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0
69-
68+
69+
next if line_old == 1 && line_new == 1
7070
yield(line, type, nil, nil, nil)
7171
next
7272
else

0 commit comments

Comments
 (0)