Skip to content
Snippets Groups Projects
Commit 9e6d0710 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #443 from CedricGatay/fix/incorrectLineNumberingInDiff

Incorrect line numbering in diff
parents 8c40aab1 6ea87c47
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -61,12 +61,12 @@ module CommitsHelper
full_line = html_escape(line.gsub(/\n/, '')).force_encoding("UTF-8")
 
if line.match(/^@@ -/)
next if line_old == 1 && line_new == 1
type = "match"
 
line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0
line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0
next if line_old == 1 && line_new == 1
yield(line, type, nil, nil, nil)
next
else
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment