diff --git a/app/views/refs/_tree_file.html.haml b/app/views/refs/_tree_file.html.haml
index 120964fa03862345cb7efd6a5a1eb138096341df..738dad9bd591be0cfc9c3261107ac0fdcda44dd2 100644
--- a/app/views/refs/_tree_file.html.haml
+++ b/app/views/refs/_tree_file.html.haml
@@ -12,8 +12,8 @@
.view_file_content
- unless file.empty?
%div{:class => current_user.dark_scheme ? "black" : "white"}
- :erb
- <%= raw file.colorize %>
+ = preserve do
+ = raw file.colorize
- else
%h3
%center Empty file