debian-mirror-gitlab/lib/banzai/renderer/redcarpet/html.rb

16 lines
331 B
Ruby
Raw Normal View History

2018-03-27 19:54:05 +05:30
module Banzai
module Renderer
module Redcarpet
class HTML < ::Redcarpet::Render::HTML
def block_code(code, lang)
lang_attr = lang ? %Q{ lang="#{lang}"} : ''
"\n<pre>" \
"<code#{lang_attr}>#{html_escape(code)}</code>" \
"</pre>"
end
end
end
end
end