Commit 604725f4f1b59d155f0db6a421f0005fa689db8b
1 parent
98b84166
Exists in
master
and in
4 other branches
specify utf-8 encoding for pygments.rb markdown 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 | ... | ... |