diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-21 16:23:53 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-21 16:23:53 +0300 |
commit | 21facf535377ad58d07e8943033fe14efface8b2 (patch) | |
tree | 020fc70236a38f44f67faeb7a6f387dd250f01f4 /app/views/projects/blob | |
parent | a4ff270d59ef951538cb9d3962ebc8bc7d990016 (diff) |
Use consistent markup and styling for highlighting across blobs, diffs, blame and snippets
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/diff.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/views/projects/blob/diff.html.haml b/app/views/projects/blob/diff.html.haml index 2e913802be1..abcfca4cd11 100644 --- a/app/views/projects/blob/diff.html.haml +++ b/app/views/projects/blob/diff.html.haml @@ -10,7 +10,8 @@ %tr.line_holder %td.old_line.diff-line-num{data: {linenumber: line_old}} = link_to raw(line_old), "#" - %td.new_line= link_to raw(line_new) , "#" + %td.new_line.diff-line-num + = link_to raw(line_new) , "#" %td.line_content.noteable_line==#{' ' * @form.indent}#{line} - if @form.unfold? && @form.bottom? && @form.to < @blob.loc diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index fed483d6788..c5a269f334c 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -14,12 +14,12 @@ - @diff_lines.each do |line| %tr.line_holder{ class: "#{line.type}" } - if line.type == "match" - %td.old_line= "..." - %td.new_line= "..." - %td.line_content.matched= line.text + %td.old_line.diff-line-num= "..." + %td.new_line.diff-line-num= "..." + %td.line_content.match= line.text - else - %td.old_line - %td.new_line + %td.old_line.diff-line-num + %td.new_line.diff-line-num %td.line_content{class: "#{line.type}"}= diff_line_content(line.text) - else .nothing-here-block No changes. |