diff options
author | Stas Bekman <stas@stason.org> | 2002-06-05 23:26:02 +0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-06 01:25:13 +0000 |
commit | 2beb85b78fee426af4ee1955e6a242ee251debec (patch) | |
tree | 3ccdbed96ccd641829c2c3e64bbd2d4bfdcfa706 /lib/Pod | |
parent | dfbc85eab5c948c5165574af463d36e7afe0af9c (diff) | |
download | perl-2beb85b78fee426af4ee1955e6a242ee251debec.tar.gz |
anchors fix
Message-ID: <3CFDBD0A.8090505@stason.org>
p4raw-id: //depot/perl@17026
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Html.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index e8f9ff3fa5..eebc4dbf3b 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -980,9 +980,8 @@ sub scan_headings { ($tag, $which_head, $otitle) = ($1,$2,$3); my $title = depod( $otitle ); - my $name = htmlify( $title ); + my $name = anchorify( $title ); $$sections{$name} = 1; - $name =~ s/\s/_/g; # htmlify keeps spaces but we don't want them here.. $title = process_text( \$otitle ); while ($which_head != $listdepth) { @@ -1903,7 +1902,7 @@ sub coderef($$){ if( exists $pages{$page} and $pages{$page} =~ /([^:.]*)\.[^:]*:/){ $page = $1 . '.html'; } - my $link = "$htmlroot/$page#item_$fid"; + my $link = "$htmlroot/$page#item_" . anchorify($fid); # Here, we take advantage of the knowledge that $htmlfileurl # ne '' implies $htmlroot eq ''. @@ -1914,7 +1913,7 @@ sub coderef($$){ $url = $link ; } } else { - $url = "#item_" . $fid; + $url = "#item_" . anchorify($fid); } confess "url has space: $url" if $url =~ /"[^"]*\s[^"]*"/; |