summaryrefslogtreecommitdiff
path: root/man/help2man
diff options
context:
space:
mode:
Diffstat (limited to 'man/help2man')
-rwxr-xr-xman/help2man10
1 files changed, 10 insertions, 0 deletions
diff --git a/man/help2man b/man/help2man
index a0f1be039..e8ea71854 100755
--- a/man/help2man
+++ b/man/help2man
@@ -46,6 +46,13 @@ BEGIN {
}
}
+sub escape_hyphens($)
+{
+ my ($s) = @_;
+ $s =~ s/-/\\-/g;
+ return $s;
+}
+
sub _ { gettext @_ }
sub N_ { $_[0] }
@@ -599,6 +606,9 @@ for my $sect (@pre, (grep ! /^($filter)$/o, @include), @post)
# Convert some latin1 chars to troff equivalents
s/\xa0/\\ /g; # non-breaking space
+ # Escape hyphens in <>-enclosed email addresses.
+ s/(<\S+\@(\S+\.)+\S{2,}>)/escape_hyphens $1/ge;
+
print;
}
}