]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: (really) match the behavior of WWW for indexing text
authorEric Wong <e@80x24.org>
Mon, 30 Jul 2018 08:23:51 +0000 (08:23 +0000)
committerEric Wong <e@80x24.org>
Fri, 3 Aug 2018 20:02:54 +0000 (20:02 +0000)
Not sure what was going through my mind when I made my first
attempt at this, but we really want to make sure we index all
the text we display in the web view (and presumably anything a
reasonable mail client can display).

Followup-to: 0cf6196025d4e4880cd1ed859257ce21dd3cdcf6
    ("search: match the behavior of WWW for indexing text")

lib/PublicInbox/SearchIdx.pm

index 1d259a8642a38a81677b30253e469592cf5ab5e8..29868d991bc25ec03c00572ba21d626413fc62b6 100644 (file)
@@ -321,8 +321,7 @@ sub add_xapian ($$$$$) {
                defined $s or return;
 
                my (@orig, @quot);
-               my $body = $part->body;
-               my @lines = split(/\n/, $body);
+               my @lines = split(/\n/, $s);
                while (defined(my $l = shift @lines)) {
                        if ($l =~ /^>/) {
                                $self->index_body(\@orig, $doc) if @orig;