From: Gurusamy Sarathy Date: Sat, 2 Oct 1999 01:23:02 +0000 (+0000) Subject: indent nested =items properly (suggested by Bill Fenner X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5677e74535f1db572e121385ce38c412bd75d2e;p=p5sagit%2Fp5-mst-13.2.git indent nested =items properly (suggested by Bill Fenner ) p4raw-id: //depot/perl@4276 --- diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 20610a8..bc74feb 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') {