Subject: [sup-devel] [issue114] Better quoted-text / top-post stripping

From: anonymous <[email-masked]>
Date: Wed, 04 Aug 2010 12:31:13 +0000

New submission from anonymous:

Redwood::Message splits a message into chunks and hides quoted text from a
previous message.

Top-posted responses are supported with BLOCK_QUOTE_PATTERN.  This patch i) adds
a new pattern to hide top-posted text from Microsoft Entourage, ii) adds a fix
for Mozilla-based mail users who top post and iii) adds a new array-based config
option "block_quote_patterns" for adding additional patterns to treat as marking
the top of a top-posted response.

----------
files: patch.better-top-post-stripping
messages: 261
nosy: anonymous
priority: feature request
ruby_version: 1.8.7
status: unread
sup_version: 0.11
title: Better quoted-text / top-post stripping

_________________________________________
Sup issue tracker <[email-masked]>
<http://masanjin.net/sup-bugs/issue114>
_________________________________________

_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Alvaro Herrera <[email-masked]>
Date: Wed, 04 Aug 2010 10:22:26 -0400

> the top of a top-posted response.

+1 for improving the top-posted detection in general.

I think this regex

+      # Microsoft Entourage doesn't indent quoted text, but it can be spotted
+      # with this line:
+      #   On 8/2/10 1:23 PM, "John Doe" <[email-masked]> wrote:
+      /^On \d+\/\d+\/\d+ .+ wrote:/,

is way too general; it could easily match the attribution line on a
non-top-posted quoted email.  I didn't try it but I think it would end
up trimming the whole contents of several emails I have on my inboxes
(which is pretty annoying --- I have set SIG_PATTERN to be just "^-- "
to avoid this very problem).

There's a small bug here:

+      # At least three dashes.  Mozilla mail clients downcase the 'm' in
+      # message.
+      /^----+\s*Original (M|m)essage\s*----+/,

Note that it matches only four or more dashes, not three as the comment says.

-- 
Álvaro Herrera <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel