From 6f646e7290114721a1b4d6b49f25496ad8d7ca7e Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 19 Jul 2011 18:00:56 -0400 Subject: added
wrappers to code blocks because rdiscount stupidly wraps
tags with paragraphs. Grr. --- plugins/code_block.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/code_block.rb') diff --git a/plugins/code_block.rb b/plugins/code_block.rb index 00762d8a..d204e1bd 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -45,10 +45,10 @@ module Jekyll @highlight = true if markup =~ CaptionUrlTitle @file = $1 - @caption = "
#{$1}#{$4}" + @caption = "
#{$1}#{$4}
" elsif markup =~ CaptionUrl @file = $1 - @caption = "
#{$1}link" + @caption = "
#{$1}link
" elsif markup =~ Caption @file = $1 @caption = "
#{$1}
\n" @@ -62,12 +62,12 @@ module Jekyll def render(context) output = super code = super.join - source = "
\n" + source = "
" source += @caption if @caption if @filetype - source += "{% highlight #{@filetype} %}\n" + code + "\n{% endhighlight %}\n
" + source += "{% highlight #{@filetype} %}\n" + code + "\n{% endhighlight %}
" else - source += "
" + code.gsub!(/
\n" + source += "
" + code.gsub!(/
" end partial = Liquid::Template.parse(source) context.stack do -- cgit v1.2.1