Issue #87
This commit is contained in:
parent
9afee5ad52
commit
f6a67fbad5
1 changed files with 10 additions and 4 deletions
|
@ -1,8 +1,14 @@
|
||||||
|
- line_old = 0
|
||||||
|
- line_new = 0
|
||||||
- lines_arr = diff.diff.lines.to_a
|
- lines_arr = diff.diff.lines.to_a
|
||||||
- line_old = lines_arr[2].match(/-(\d)/)[0].to_i.abs rescue 0
|
- lines_arr.each do |line|
|
||||||
- line_new = lines_arr[2].match(/\+(\d)/)[0].to_i.abs rescue 0
|
- next if line.match(/^--- a/)
|
||||||
- lines = lines_arr[3..-1].join
|
- next if line.match(/^\+\+\+ b/)
|
||||||
- lines.each_line do |line|
|
- if line.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
|
||||||
|
|
||||||
= diff_line(line, line_new, line_old)
|
= diff_line(line, line_new, line_old)
|
||||||
- if line[0] == "+"
|
- if line[0] == "+"
|
||||||
- line_new += 1
|
- line_new += 1
|
||||||
|
|
Loading…
Reference in a new issue