Commit c7323e8f09302e40c0b13279a7580ba03af188f1

Authored by Dmitriy Zaporozhets
2 parents 98b84166 604725f4

Merge pull request #907 from NARKOZ/markdown_code_encoding

set encoding to utf-8 for pygments.rb wrapper
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/redcarpet/render/gitlab_html.rb
1 1 class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
2 2 def block_code(code, language)
3 3 if Pygments::Lexer.find(language)
4   - Pygments.highlight(code, :lexer => language)
  4 + Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
5 5 else
6   - Pygments.highlight(code)
  6 + Pygments.highlight(code, :options => {:encoding => 'utf-8'})
7 7 end
8 8 end
9   -end
10 9 \ No newline at end of file
  10 +end
... ...