From cb6442e6249099ce708c0d26af84738eaef240a2 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 30 Jul 2011 09:06:38 -0400 Subject: [PATCH] fixed empty line stripping from codeblocks --- plugins/pygments_code.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pygments_code.rb b/plugins/pygments_code.rb index 05b4fb5..cdd6c3a 100644 --- a/plugins/pygments_code.rb +++ b/plugins/pygments_code.rb @@ -7,7 +7,7 @@ FileUtils.mkdir_p(PYGMENTS_CACHE_DIR) module HighlightCode def highlight(str, lang) - str = pygments(str, lang).match(/
(.+)<\/pre>/m)[1].to_s.gsub(/\s*$/, '') #strip out divs 
+ str = pygments(str, lang).match(/
(.+)<\/pre>/m)[1].to_s.gsub(/ *$/, '') #strip out divs 
table = '
'
     code = ''
     str.lines.each_with_index do |line,index|