The previous regexp matches were too aggressive w.r.t. scissors.
We destroy trailing whitespace anyways, so do not worry about it
when cutting signatures and patches off.
$s =~ s/(?:^[^\n]*:\s*\n)?(?:^>[^\n]*\n)+(?:^\s*\n)?//mg;
# Drop signatures
- $s =~ s/\n*-- \n.*\z//s;
+ $s =~ s/^-- \n.*\z//ms;
# drop the remainder of git patches, they're usually better
# to review when the full message is viewed
- if ($s =~ s/\n*---\n.*\z//s) {
+ if ($s =~ s/^---\n.*\z//ms) {
$more = "$pfx...\n";
}