about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 2e7c8747..5076cf92 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -111,10 +111,12 @@ sub index_entry {
                 $s =~ s/\A\s+//s;
                 $s =~ s/\s+\z//s;
 
-                # add prefix:
-                $s =~ s/^/$pfx/sgm;
+                if (length $s) {
+                        # add prefix:
+                        $s =~ s/^/$pfx/sgm;
 
-                $rv .= $s . "\n";
+                        $rv .= $s;
+                }
                 ++$part_nr;
         });