2014-04-15 15:02:02 +00:00
|
|
|
.diff-file
|
|
|
|
.diff-content
|
2014-08-11 09:59:36 +00:00
|
|
|
- if gitlab_markdown?(@blob.name)
|
2014-04-15 15:02:02 +00:00
|
|
|
.file-content.wiki
|
|
|
|
= preserve do
|
|
|
|
= markdown(@content)
|
2014-08-11 09:59:36 +00:00
|
|
|
- elsif markup?(@blob.name)
|
2014-04-15 15:02:02 +00:00
|
|
|
.file-content.wiki
|
2014-08-11 09:59:36 +00:00
|
|
|
= raw render_markup(@blob.name, @content)
|
2014-04-15 15:02:02 +00:00
|
|
|
- else
|
|
|
|
.file-content.code
|
2014-09-08 13:27:12 +00:00
|
|
|
- unless @diff_lines.empty?
|
2014-04-15 15:02:02 +00:00
|
|
|
%table.text-file
|
2014-09-08 13:27:12 +00:00
|
|
|
- @diff_lines.each do |line|
|
|
|
|
%tr.line_holder{ id: line.code, class: "#{line.type}" }
|
|
|
|
- if line.type == "match"
|
2014-04-15 15:02:02 +00:00
|
|
|
%td.old_line= "..."
|
|
|
|
%td.new_line= "..."
|
2014-09-08 13:27:12 +00:00
|
|
|
%td.line_content.matched= line.text
|
2014-04-15 15:02:02 +00:00
|
|
|
- else
|
|
|
|
%td.old_line
|
2014-09-08 13:27:12 +00:00
|
|
|
= link_to raw(line.type == "new" ? " " : line.old_pos), "##{line.code}", id: line.code
|
|
|
|
%td.new_line= link_to raw(line.type == "old" ? " " : line.new_pos) , "##{line.code}", id: line.code
|
|
|
|
%td.line_content{class: "noteable_line #{line.type} #{line.code}", "line.code" => line.code}= raw diff_line_content(line.text)
|
2014-04-15 15:02:02 +00:00
|
|
|
- else
|
2014-05-22 09:25:44 +00:00
|
|
|
.nothing-here-block No changes.
|