diff --git a/scripts/managen b/scripts/managen index 170d1f8bd3..6621b1684c 100755 --- a/scripts/managen +++ b/scripts/managen @@ -302,7 +302,30 @@ sub render { # skip leading blank lines next; } + $start = 1; + + if(/^[ \t]*\n/) { + # count and ignore blank lines + $blankline++; + next; + } + elsif($d =~ /^ (.*)/) { + my $word = $1; + if(!$quote && $manpage) { + push @desc, "\n" if($blankline); + push @desc, ".nf\n"; + $blankline = 0; + } + $quote = 1; + $d = "$word\n"; + } + elsif($quote) { + # end of quote + push @desc, ".fi\n" if($manpage); + $quote = 0; + } + if(/^# (.*)/) { $header = 1; if($top != 1) { @@ -366,26 +389,6 @@ sub render { print STDERR "$f:$line:1:ERROR: $cmd detected, use ##-style\n"; return 3; } - elsif(/^[ \t]*\n/) { - # count and ignore blank lines - $blankline++; - next; - } - elsif($d =~ /^ (.*)/) { - my $word = $1; - if(!$quote && $manpage) { - push @desc, "\n" if($blankline); - push @desc, ".nf\n"; - $blankline = 0; - } - $quote = 1; - $d = "$word\n"; - } - elsif($quote && ($d !~ /^ (.*)/)) { - # end of quote - push @desc, ".fi\n" if($manpage); - $quote = 0; - } $d =~ s/`%DATE`/$date/g; $d =~ s/`%VERSION`/$version/g;