about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-02 11:18:34 +0000
committerEric Wong <e@80x24.org>2021-10-02 20:09:38 +0000
commitf28fdcd6d8d6ac36c7b6adf6670238426f3cc067 (patch)
treee1b528b98c0aca4eaab8d811a16d4c7e95a75ec1
parent64f6a4c97b05a709de60aea9c3a5f51d7a37f226 (diff)
downloadpublic-inbox-f28fdcd6d8d6ac36c7b6adf6670238426f3cc067.tar.gz
This should prevent some false duplicates.  I noticed this
while implementing "lei mail-diff", and only noticed it when
I implemented the ContentDigestDbg wrapper for mail-diff.
-rw-r--r--lib/PublicInbox/ContentHash.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/ContentHash.pm b/lib/PublicInbox/ContentHash.pm
index f6ae9011..bacc9cdd 100644
--- a/lib/PublicInbox/ContentHash.pm
+++ b/lib/PublicInbox/ContentHash.pm
@@ -20,6 +20,7 @@ use Digest::SHA;
 sub digest_addr ($$$) {
         my ($dig, $h, $v) = @_;
         $v =~ tr/"//d;
+        $v =~ tr/\r\n\t / /s;
         $v =~ s/@([a-z0-9\_\.\-\(\)]*([A-Z])\S*)/'@'.lc($1)/ge;
         utf8::encode($v);
         $dig->add("$h\0$v\0");