I ended up having to wrap the pre code in a div for RDiscount not to freak

This commit is contained in:
Chris Van Pelt 2008-11-23 23:36:29 -08:00
parent aba5089283
commit 2118b55045
1 changed files with 8 additions and 1 deletions

View File

@ -8,7 +8,14 @@ module Jekyll
end
def render(context)
"<pre class='syntax-highlight:#{@lang}'>#{escape(super)}</pre>"
#The div is required because RDiscount blows ass
<<-HTML
<div>
<pre>
<code class='#{@lang}'>#{h(super.to_s).strip}</code>
</pre>
</div>
HTML
end
end
end