]> git.cworth.org Git - sup/commitdiff
grab non-terminal blank lines as part of quotes
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 16 Jan 2008 22:20:08 +0000 (14:20 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 16 Jan 2008 22:20:34 +0000 (14:20 -0800)
This helps with those irritating mailers that do something like this:
Bob said:
<blank line, for no reason>
> quoted text
> quoted text

lib/sup/message.rb

index 85e2760cea1ab20fa4d263ed0c93830268c1bc52..c487ae35763902f6b847f789942e52c640d82fcf 100644 (file)
@@ -439,7 +439,7 @@ private
       when :quote
         newstate = nil
 
-        if line =~ QUOTE_PATTERN || line =~ QUOTE_START_PATTERN #|| line =~ /^\s*$/
+        if line =~ QUOTE_PATTERN || (line =~ /^\s*$/ && nextline =~ QUOTE_PATTERN)
           chunk_lines << line
         elsif line =~ SIG_PATTERN && (lines.length - i) < MAX_SIG_DISTANCE
           newstate = :sig