commit 1db9360a49616cc9010874cf73ac8ea6ac62d358
parent c75376f1dff385cb66bdbae5552e05bd436cb8a5
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Wed, 14 Nov 2007 17:25:03 +0000
re-fix Text to truncate any penultimate blank lines
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@704 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
@@ -111,7 +111,7 @@ EOS
@lines = lines.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap
## trim off all empty lines except one
- @lines.pop while @lines.last =~ /^\s*$/
+ @lines.pop while @lines.length > 1 && @lines[-1] =~ /^\s*$/ && @lines[-2] =~ /^\s*$/
end
def inlineable?; true end