diff options
author | Graham Barr <gbarr@pobox.com> | 1998-10-17 07:57:54 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-25 06:37:34 +0000 |
commit | 350ccacde22c7ee560c24442356e2a429691af6f (patch) | |
tree | ccdceb3b4f317630809dcb8c6864be76bec2ec00 /lib/Pod | |
parent | 33c2748902d07b7ec367f87ad66e61e89f2aa994 (diff) | |
download | perl-350ccacde22c7ee560c24442356e2a429691af6f.tar.gz |
handle '::' in section names properly
Message-ID: <19981017125754.C510@pobox.com>
Subject: Re: pod2html
p4raw-id: //depot/perl@2060
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Html.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 2a90e1d8a5..3994f5dc80 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -1373,9 +1373,6 @@ sub process_L { # LREF: a la HREF L<show this text|man/section> $linktext = $1 if s:^([^|]+)\|::; - # a :: acts like a / - s,::,/,; - # make sure sections start with a / s,^",/",g; s,^,/,g if (!m,/, && / /); @@ -1399,6 +1396,11 @@ sub process_L { if ($page eq "") { $link = "#" . htmlify(0,$section); $linktext = $section unless defined($linktext); + } elsif ( $page =~ /::/ ) { + $linktext = ($section ? "$section" : "$page"); + $page =~ s,::,/,g; + $link = "$htmlroot/$page.html"; + $link .= "#" . htmlify(0,$section) if ($section); } elsif (!defined $pages{$page}) { warn "$0: $podfile: cannot resolve L<$str> in paragraph $paragraph: no such page '$page'\n"; $link = ""; |