summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaito <saitowu@gmail.com>2011-11-30 15:05:37 +0800
committerSaito <saitowu@gmail.com>2011-11-30 15:05:37 +0800
commit12c01d74016c266b6acc798c0c1b68765afb4871 (patch)
treef6a92ac15c02be4451ab4a3660542ee86289b73b /lib
parentf114a4f34970cff2393e4cd1f44add577878681f (diff)
downloadgitlab-ce-12c01d74016c266b6acc798c0c1b68765afb4871.tar.gz
fix encode bugs on diff not utf-8 encode's code
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils.rb b/lib/utils.rb
index 23f05f6f919..d0339c2b271 100644
--- a/lib/utils.rb
+++ b/lib/utils.rb
@@ -29,12 +29,12 @@ module Utils
module Colorize
include CharEncode
def colorize
- system_colorize(encode(data), name)
+ system_colorize(data, name)
end
def system_colorize(data, file_name)
ft = handle_file_type(file_name)
- Pygments.highlight(data, :lexer => ft, :options => { :encoding => 'utf-8', :linenos => 'True' })
+ Pygments.highlight(encode(data), :lexer => ft, :options => { :encoding => 'utf-8', :linenos => 'True' })
end
def handle_file_type(file_name, mime_type = nil)