commit 58d450d507300e6fe76370009298bad4ebde409c
parent cd4316b827b38173072d0873b40c5cb1c9d223ad
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Wed, 16 Jan 2008 17:18:54 -0800
more quote detection tweaking
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
@@ -420,7 +420,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