debian-mirror-gitlab/lib/banzai/renderer/common_mark/html.rb
2018-11-20 20:47:30 +05:30

17 lines
431 B
Ruby

module Banzai
module Renderer
module CommonMark
class HTML < CommonMarker::HtmlRenderer
def code_block(node)
block do
out("<pre#{sourcepos(node)}><code")
out(' lang="', node.fence_info, '"') if node.fence_info.present?
out('>')
out(escape_html(node.string_content))
out('</code></pre>')
end
end
end
end
end
end