diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-02 01:23:02 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-02 01:23:02 +0000 |
commit | b5677e74535f1db572e121385ce38c412bd75d2e (patch) | |
tree | 1ffdb407c47103e5e683cee1ef997df4985abf95 /pod/pod2man.PL | |
parent | 0c9e4c8cd72be908317908702a44bd83980d8d12 (diff) | |
download | perl-b5677e74535f1db572e121385ce38c412bd75d2e.tar.gz |
indent nested =items properly (suggested by Bill Fenner
<fenner@research.att.com>)
p4raw-id: //depot/perl@4276
Diffstat (limited to 'pod/pod2man.PL')
-rw-r--r-- | pod/pod2man.PL | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 20610a84c3..bc74feb9e3 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -927,10 +927,16 @@ while (<>) { elsif ($Cmd eq 'over') { push(@indent,$indent); $indent += ($_ + 0) || 5; + if ($#indent > 0) { + print ".RS ", $indent[$#indent] - $indent[$#indent - 1], "\n"; + } } elsif ($Cmd eq 'back') { $indent = pop(@indent); warn "$0: Unmatched =back in paragraph $. of $ARGV\n" unless defined $indent; + if ($#indent >= 0) { + print ".RE\n"; + } $needspace = 1; } elsif ($Cmd eq 'item') { @@ -940,7 +946,7 @@ while (<>) { s/\\\*\(L"([^"]+?)""/'$1'/g; s/[^"]""([^"]+?)""[^"]/'$1'/g; # here do something about the $" in perlvar? - print STDOUT qq{.Ip "$_" $indent\n}; + print STDOUT qq{.Ip "$_" $indent-$indent[$#indent]\n}; push(@Indices, qq{.IX Item "$_"\n}); } elsif ($Cmd eq 'pod') { |