diff options
author | Eric Wong <e@80x24.org> | 2015-08-29 21:30:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-29 21:35:39 +0000 |
commit | 28ee19c32a1ecf8e22f30e8f9de860695f4fb30c (patch) | |
tree | 40a372c8d3c61d7e2917d0b4c981ae61df0e0397 /lib/PublicInbox/Search.pm | |
parent | 26e69c85938c62774f20fd1861b67bcb01ba477d (diff) | |
download | public-inbox-28ee19c32a1ecf8e22f30e8f9de860695f4fb30c.tar.gz |
Perl does not currently optimize for this. ref (from p5p): http://mid.gmane.org/D5C27970-9176-4C7A-8B99-7D78360E67A2@pobox.com
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 4362a002..4b3830e2 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -251,10 +251,11 @@ sub subject_summary { last if length($new) >= $max; $subj = $new; } - if (length $subj) { + if ($subj ne '') { my $r = scalar @subj ? ' ...' : ''; $subj =~ s/ \z/$r/s; } else { + # subject has one REALLY long word, and NOT spam? wtf @subj = ($l =~ /\A(.{1,72})/); $subj = $subj[0] . ' ...'; } |