Skip to content
Snippets Groups Projects
Commit 604725f4 authored by Nihad Abbasov's avatar Nihad Abbasov
Browse files

specify utf-8 encoding for pygments.rb markdown wrapper

parent 98b84166
No related branches found
No related tags found
1 merge request!907set encoding to utf-8 for pygments.rb wrapper
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
\ No newline at end of file
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment