Commit 604725f4 authored by Nihad Abbasov's avatar Nihad Abbasov

specify utf-8 encoding for pygments.rb markdown wrapper

parent 98b84166
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