summaryrefslogtreecommitdiff
path: root/mdwn2man
diff options
context:
space:
mode:
Diffstat (limited to 'mdwn2man')
-rwxr-xr-xmdwn2man6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdwn2man b/mdwn2man
index 8c70c87c1..e78a4d18c 100755
--- a/mdwn2man
+++ b/mdwn2man
@@ -8,8 +8,12 @@ print ".TH $prog $section\n";
while (<>) {
s{(\\?)\[\[([^\s\]]+)\]\]}{$1 ? "[[$2]]" : $2}eg;
- s/^#\s/.SH /;
+ if (/^#\s/) {
+ s/^#\s/.SH /;
+ <>; # blank;
+ }
s/^\s+//;
+ s/-/\\-/g;
s/^Warning:.*//g;
s/^$/.PP\n/;
s/\`//g;