Using github's linguist to better detect filetypes and to do syntax highlighting.

This commit is contained in:
Arthur Schreiber 2012-04-20 23:21:12 +02:00
parent 9ee345750c
commit 5b6019f357
6 changed files with 21 additions and 56 deletions

View file

@ -11,10 +11,10 @@
- if file.text?
.view_file_content
- unless file.empty?
%div{:class => current_user.dark_scheme ? "black" : "white"}
= preserve do
= raw file.colorize
- else
%div{:class => current_user.dark_scheme ? "black" : "white"}
= preserve do
= raw file.colorize(options: { linenos: 'True'})
- else
%h3
%center Empty file
- elsif file.image?