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

26 lines
851 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
.file-content.code
- 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"
2014-04-15 11:02:02 -04:00
%td.old_line= "..."
%td.new_line= "..."
%td.line_content.matched= line.text
2014-04-15 11:02:02 -04:00
- else
%td.old_line
%td.new_line
%td.line_content{class: "#{line.type}"}= raw diff_line_content(line.text)
2014-04-15 11:02:02 -04:00
- else
.nothing-here-block No changes.