Commit 13cfa49a authored by Marin Jankovski's avatar Marin Jankovski

Color the lines correctly.

parent 7d45624d
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
line_old: line_old, line_new: line_new, bottom: false} line_old: line_old, line_new: line_new, bottom: false}
- else - else
- if diff.new_file - if diff.new_file
%td.old_line{ class: "old" } %td.old_line
%td.line_content.parallel= " " %td.line_content.parallel= raw " "
- else - else
- next if type == 'new' - next if type == 'new'
%td.old_line{ class: "#{type}" } %td.old_line{ class: "#{type}" }
...@@ -19,18 +19,20 @@ ...@@ -19,18 +19,20 @@
- else - else
%td.line_content.parallel= raw line %td.line_content.parallel= raw line
- if diff.deleted_file - if diff.deleted_file
%td.new_line{class: "new", data: {linenumber: line_new}} %td.new_line{ data: {linenumber: line_new}}
%td.line_content.parallel= " " %td.line_content.parallel= raw " "
- else - else
%td.new_line{class: "#{type}", data: {linenumber: line_new}} - if type == 'old'
- if type == 'old' %td.new_line{class: "#{next_type == 'new' ? 'new' : nil}", data: {linenumber: line_new}}
- if next_type == 'new' - if next_type == 'new'
- content = next_line - content = next_line
= link_to raw(line_new) , "##{line_code}", id: line_code = link_to raw(line_new) , "##{line_code}", id: line_code
%td.line_content.parallel{class: "noteable_line new #{line_code}", "line_code" => line_code}= raw content
- else - else
- content = " " - content = " "
%td.line_content.parallel{class: "noteable_line new #{line_code}", "line_code" => line_code}= raw content %td.line_content.parallel{class: "noteable_line #{line_code}", "line_code" => line_code}= raw content
- else - else
%td.new_line{class: "#{type}", data: {linenumber: line_new}}
= link_to raw(line_new) , "##{line_code}", id: line_code = link_to raw(line_new) , "##{line_code}", id: line_code
%td.line_content.parallel{class: "#{type}"}= raw line %td.line_content.parallel{class: "#{type}"}= raw line
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment