diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-20 11:01:34 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-20 11:01:56 -0400 |
commit | ae51fe859e832c90866204c6cda93f85ebef6543 (patch) | |
tree | aa07ff23459d808e3d600a5b783f4e7779fdde85 /plugins/code_block.rb | |
parent | 3587076aed88a19246ffc7bfeeddde96bb6b38a0 (diff) | |
download | my_new_personal_website-ae51fe859e832c90866204c6cda93f85ebef6543.tar.xz my_new_personal_website-ae51fe859e832c90866204c6cda93f85ebef6543.zip |
removed incorrect usage of gsub! which was returning nil if the substitution was not found. Now strips leading and trailing whitespace
Diffstat (limited to 'plugins/code_block.rb')
-rw-r--r-- | plugins/code_block.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb index d204e1bd..8c308f21 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 %}</figure></div>" else - source += "<pre><code>" + code.gsub!(/</,'<') + "</code></pre></figure></div>" + source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>" end partial = Liquid::Template.parse(source) context.stack do |