gitlab-org--gitlab-foss/app/views/projects/blob/preview.html.haml

26 lines
923 B
Text
Raw Normal View History

2014-04-15 11:02:02 -04:00
.diff-file
.diff-content
- if gitlab_markdown?(@blob.name)
2014-04-15 11:02:02 -04:00
.file-content.wiki
= preserve do
= markdown(@content)
- elsif markup?(@blob.name)
2014-04-15 11:02:02 -04:00
.file-content.wiki
= raw render_markup(@blob.name, @content)
2014-04-15 11:02:02 -04:00
- else
2016-01-25 05:42:47 -05:00
.file-content.code.js-syntax-highlight
- unless @diff_lines.empty?
2014-04-15 11:02:02 -04:00
%table.text-file
- @diff_lines.each do |line|
%tr.line_holder{ class: "#{line.type}" }
- if line.type == "match"
%td.old_line.diff-line-num= "..."
%td.new_line.diff-line-num= "..."
%td.line_content.match= line.text
2014-04-15 11:02:02 -04:00
- else
%td.old_line.diff-line-num
%td.new_line.diff-line-num
%td.line_content{ class: "#{line.type}" }= diff_line_content(line.text)
2014-04-15 11:02:02 -04:00
- else
.nothing-here-block No changes.