Merge pull request #907 from NARKOZ/markdown_code_encoding
set encoding to utf-8 for pygments.rb wrapper
This commit is contained in:
commit
c7323e8f09
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue