specify utf-8 encoding for pygments.rb markdown wrapper

This commit is contained in:
Nihad Abbasov 2012-06-08 01:23:31 -07:00
parent 98b8416647
commit 604725f4f1

View file

@ -1,9 +1,9 @@
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
def block_code(code, language)
if Pygments::Lexer.find(language)
Pygments.highlight(code, :lexer => language)
Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
else
Pygments.highlight(code)
Pygments.highlight(code, :options => {:encoding => 'utf-8'})
end
end
end
end