diff options
Diffstat (limited to 'docs/cmdline-opts/gen.pl')
-rwxr-xr-x | docs/cmdline-opts/gen.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index e891f6709..f6f6ce8be 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -76,6 +76,7 @@ sub manpageify { sub printdesc { my @desc = @_; + my $exam = 0; for my $d (@desc) { if($d =~ /\(Added in ([0-9.]+)\)/i) { my $ver = $1; @@ -89,6 +90,16 @@ sub printdesc { # *italics* $d =~ s/\*([^ ]*)\*/\\fI$1\\fP/g; } + if(!$exam && ($d =~ /^ /)) { + # start of example + $exam = 1; + print ".nf\n"; # no-fill + } + elsif($exam && ($d !~ /^ /)) { + # end of example + $exam = 0; + print ".fi\n"; # fill-in + } # skip lines starting with space (examples) if($d =~ /^[^ ]/) { for my $k (keys %optlong) { |