]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: match quote detection behavior of view
authorEric Wong <e@80x24.org>
Fri, 9 Sep 2016 00:01:26 +0000 (00:01 +0000)
committerEric Wong <e@80x24.org>
Fri, 9 Sep 2016 00:02:19 +0000 (00:02 +0000)
This is stricter than the mutt quote_regexp default
("^([ \t]*[|>:}#])+" on Debian jessie),
but matches what we have in View.pm.

I prefer the stricter quote detection since it is less ambiguous
and less likely to hide/obscure important details.

lib/PublicInbox/SearchIdx.pm

index ae890605d14e56a7386f100ee477786d45c5dc2f..25452daec4280eae41a3d8f311c49bd2d5c0cbde 100644 (file)
@@ -184,7 +184,7 @@ sub add_message {
                        $part->body_set('');
                        my @lines = split(/\n/, $body);
                        while (defined(my $l = shift @lines)) {
-                               if ($l =~ /^\s*>/) {
+                               if ($l =~ /^>/) {
                                        push @quot, $l;
                                } else {
                                        push @orig, $l;