Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_text_file.html.haml « commits « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b20aa8afe40bf6db204ce4596b10a968db172d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- lines_arr = diff.diff.lines.to_a
- line_old = lines_arr[2].match(/-(\d)/)[0].to_i.abs rescue 0
- line_new = lines_arr[2].match(/\+(\d)/)[0].to_i.abs rescue 0
- lines = lines_arr[3..-1].join
- lines.each_line do |line|
  = diff_line(line, line_new, line_old)
  - if line[0] == "+"
    - line_new += 1
  - elsif 
    - line[0] == "-"
    - line_old += 1
  - else 
    - line_new += 1
    - line_old += 1