Commit 96274c27 authored by http://jneen.net/'s avatar http://jneen.net/

add the wrapping back in for the banzai filter

parent 2ae837f9
......@@ -20,7 +20,7 @@ module Banzai
code = node.text
begin
highlighted = block_code(code, language)
highlighted = %<<pre class="#{css_classes}"><code>#{block_code(code, language)}</code></pre>>
rescue
# Gracefully handle syntax highlighter bugs/errors to ensure
# users can still access an issue/comment/etc.
......@@ -31,6 +31,10 @@ module Banzai
replace_parent_pre_element(node, highlighted)
end
def css_classes
"code highlight js-syntax-highlight #{lexer.tag}"
end
private
def replace_parent_pre_element(node, highlighted)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment