From 435cec79e07d5a173f7d6c8350bbfedbc4332e82 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|