This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
indent nested =items properly (suggested by Bill Fenner
authorGurusamy Sarathy <gsar@cpan.org>
Sat, 2 Oct 1999 01:23:02 +0000 (01:23 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sat, 2 Oct 1999 01:23:02 +0000 (01:23 +0000)
<fenner@research.att.com>)

p4raw-id: //depot/perl@4276

pod/pod2man.PL

index 20610a8..bc74feb 100644 (file)
@@ -927,10 +927,16 @@ while (<>) {
        elsif ($Cmd eq 'over') {
            push(@indent,$indent);
            $indent += ($_ + 0) || 5;
        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;
        }
        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') {
            $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?
            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') {
       push(@Indices, qq{.IX Item "$_"\n});
        }
        elsif ($Cmd eq 'pod') {