Merge pull request #907 from NARKOZ/markdown_code_encoding

set encoding to utf-8 for pygments.rb wrapper
This commit is contained in:
Dmitriy Zaporozhets 2012-06-08 01:41:22 -07:00
commit c7323e8f09
1 changed files with 3 additions and 3 deletions

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