diff options
Diffstat (limited to 'app/views/snippets/show.html.haml')
-rw-r--r-- | app/views/snippets/show.html.haml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 1b8701e91ed..f05e73c2273 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -15,8 +15,12 @@ %span.options = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn very_small", target: "_blank" .file_content.code - %div{class: current_user.dark_scheme ? "black" : ""} - = raw @snippet.colorize(options: { linenos: 'True'}) + - unless @snippet.content.empty? + %div{class: current_user.dark_scheme ? "black" : "white"} + = preserve do + = raw Pygments.highlight(@snippet.content, formatter: :gitlab) + - else + %h4.nothing_here_message Empty file %div |