aboutsummaryrefslogtreecommitdiff
path: root/plugins/code_block.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/code_block.rb')
-rw-r--r--plugins/code_block.rb2
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!(/</,'&lt;') + "</code></pre></figure></div>"
+ source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'&lt;') + "</code></pre></figure></div>"
end
partial = Liquid::Template.parse(source)
context.stack do