specify utf-8 encoding for pygments.rb markdown wrapper
This commit is contained in:
parent
98b8416647
commit
604725f4f1
|
@ -1,9 +1,9 @@
|
||||||
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
|
Loading…
Reference in a new issue