summaryrefslogtreecommitdiff
path: root/app/views/snippets/show.html.haml
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-23 22:31:09 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-23 22:31:09 +0300
commit9304d049de0493de457fdec02114d5a23d116f9b (patch)
tree673933810f30af8931f9ff7beb20cc61d9978b7b /app/views/snippets/show.html.haml
parent470aa7675e07724ff48f159ee12da40409949222 (diff)
downloadgitlab-ce-9304d049de0493de457fdec02114d5a23d116f9b.tar.gz
Fixed some tests and snippet colorize
Diffstat (limited to 'app/views/snippets/show.html.haml')
-rw-r--r--app/views/snippets/show.html.haml8
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