2012-04-17 23:02:21 +02:00
|
|
|
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
|
|
|
def block_code(code, language)
|
|
|
|
if Pygments::Lexer.find(language)
|
2012-06-08 10:23:31 +02:00
|
|
|
Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
|
2012-04-17 23:02:21 +02:00
|
|
|
else
|
2012-06-08 10:23:31 +02:00
|
|
|
Pygments.highlight(code, :options => {:encoding => 'utf-8'})
|
2012-04-17 23:02:21 +02:00
|
|
|
end
|
|
|
|
end
|
2012-06-08 10:23:31 +02:00
|
|
|
end
|