From ae51fe859e832c90866204c6cda93f85ebef6543 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 20 Jul 2011 11:01:34 -0400 Subject: [PATCH] removed incorrect usage of gsub! which was returning nil if the substitution was not found. Now strips leading and trailing whitespace --- plugins/code_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/code_block.rb b/plugins/code_block.rb index d204e1b..8c308f2 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -67,7 +67,7 @@ module Jekyll if @filetype source += "{% highlight #{@filetype} %}\n" + code + "\n{% endhighlight %}" else - source += "
" + code.gsub!(/
" + source += "
" + code.lstrip.rstrip.gsub(/
" end partial = Liquid::Template.parse(source) context.stack do