moved from albino -> pygments.rb
This commit is contained in:
parent
d49645a013
commit
b3279b9b51
7 changed files with 21 additions and 17 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue