diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-22 19:14:54 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-22 19:14:54 +0400 |
commit | 9e6d0710e927aa8ea834b8a9ae9f277be617ac7d (patch) | |
tree | 86c831ab21236f21ffa5b97c752369612ce41b39 | |
parent | 8c40aab120dbc5507ab9cc8d7ad8e2519d6e9f25 (diff) | |
parent | 6ea87c47f0f8a24ae031c3fff17bc913889ecd00 (diff) |
Merge pull request #443 from CedricGatay/fix/incorrectLineNumberingInDiffv2.2.0
Incorrect line numbering in diff
-rw-r--r-- | app/helpers/commits_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 3ed8e8c3946..d097c2712eb 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -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 |