diff options
author | Damien Miller <djm@mindrot.org> | 2002-04-17 12:30:45 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-04-17 12:30:45 +1000 |
commit | 5efd71038d4207b576caea3ce148a8cffe268eae (patch) | |
tree | 6b00381d4e08ddff7dac52937153069ff58d298c /mdoc2man.pl | |
parent | bd63874d4bc3048f5dfbba8dc5f02fd57e9bdc7b (diff) |
- (djm) Fix .Nm in mdoc2man.pl from pspencer@fields.utoronto.ca
Diffstat (limited to 'mdoc2man.pl')
-rw-r--r-- | mdoc2man.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc2man.pl b/mdoc2man.pl index fddb2e09..928fc5d7 100644 --- a/mdoc2man.pl +++ b/mdoc2man.pl @@ -318,11 +318,13 @@ sub ParseMacro # ($line) if (/^Nm$/) { - $name = shift @words + my $n = $name; + $n = shift @words if (@words > 0); + $name = $n unless $name; $retval .= ".br\n" if ($synopsis); - $retval .= "\\fB$name\\fP"; + $retval .= "\\fB$n\\fP"; $nospace = 1 if (! $nospace && $words[0] =~ m/^[\.,]/); next; |