commit f24e54e0da3fb96f8a2e6543521a774189deadc8
parent 047ed8ad6cc16bcdd242e92f4e427f6bfcbb0c21
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Wed, 16 Jan 2008 17:19:00 -0800
Merge branch 'quote-detection' into next
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -29,7 +29,7 @@ class Message
QUOTE_PATTERN = /^\s{0,4}[>|\}]/
BLOCK_QUOTE_PATTERN = /^-----\s*Original Message\s*----+$/
- QUOTE_START_PATTERN = /\w/
+ QUOTE_START_PATTERN = /\w.*:$/
SIG_PATTERN = /(^-- ?$)|(^\s*----------+\s*$)|(^\s*_________+\s*$)|(^\s*--~--~-)|(^\s*--\+\+\*\*==)/
MAX_SIG_DISTANCE = 15 # lines from the end
@@ -435,7 +435,7 @@ private
when :text
newstate = nil
- if line =~ QUOTE_START_PATTERN && nextline =~ QUOTE_PATTERN
+ if line =~ QUOTE_PATTERN || (line =~ QUOTE_START_PATTERN && nextline =~ QUOTE_PATTERN)
newstate = :quote
elsif line =~ SIG_PATTERN && (lines.length - i) < MAX_SIG_DISTANCE
newstate = :sig