From cb6442e6249099ce708c0d26af84738eaef240a2 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 30 Jul 2011 09:06:38 -0400 Subject: fixed empty line stripping from codeblocks --- plugins/pygments_code.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/pygments_code.rb b/plugins/pygments_code.rb index 05b4fb57..cdd6c3a4 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|
-- 
cgit v1.2.1