We can replace an expensive `s///' substitution with a simpler
`chop'. Furthermore, we can delay the "</b>\n" replacement
to ensure it's on the same line of Perl code as the `<b>'
opening tag for readability.
}
my $s_s = nr_to_s($nr_s, 'sibling', 'siblings');
my $s_c = nr_to_s($nr_c, 'reply', 'replies');
- $attr =~ s!\n\z!</b>\n!s;
+ chop $attr; # remove "\n"
$attr =~ s!<a\nhref.*</a> (?:" )?!!s; # no point in dup subject
$attr =~ s!<a\nhref=[^>]+>([^<]+)</a>!$1!s; # no point linking to self
- $rv .= "<b>@ $attr";
+ $rv .= "<b>@ $attr</b>\n";
if ($nr_c) {
my $cmid = $children->[0] ? $children->[0]->{mid} : undef;
$rv .= $pad . _skel_hdr($mapping, $cmid);