summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-10-21 15:35:42 +0300
committergitlabhq <m@gitlabhq.com>2011-10-22 14:08:03 +0300
commitb3279b9b5170a19a2aa504eae94a9a8be5908755 (patch)
treef2a17f15baf358d66807f510a9d1dfd1e2104d94 /lib
parentd49645a01348e093b87586b3575e93233d497aea (diff)
downloadgitlab-ce-b3279b9b5170a19a2aa504eae94a9a8be5908755.tar.gz
moved from albino -> pygments.rb
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils.rb b/lib/utils.rb
index 40bf26735c2..e57121a3e2a 100644
--- a/lib/utils.rb
+++ b/lib/utils.rb
@@ -18,8 +18,12 @@ module Utils
module Colorize
def colorize
- ft = handle_file_type(name, mime_type)
- Albino.colorize(data, ft, :html, 'utf-8', "linenos=True")
+ 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' })
end
def handle_file_type(file_name, mime_type = nil)