Commit c7323e8f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #907 from NARKOZ/markdown_code_encoding

set encoding to utf-8 for pygments.rb wrapper
parents 98b84166 604725f4
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
def block_code(code, language) def block_code(code, language)
if Pygments::Lexer.find(language) if Pygments::Lexer.find(language)
Pygments.highlight(code, :lexer => language) Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
else else
Pygments.highlight(code) Pygments.highlight(code, :options => {:encoding => 'utf-8'})
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment