--- Html.pm Wed Aug 6 11:51:04 2003 +++ POD2HTML.pm Wed Aug 6 13:47:31 2003 @@ -1,9 +1,9 @@ -package Pod::Html; +package POD2HTML; use strict; require Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = 1.05; +$VERSION = 1.05; # +p0.01 @ISA = qw(Exporter); @EXPORT = qw(pod2html htmlify); @EXPORT_OK = qw(anchorify); @@ -317,6 +317,21 @@ splice( @$dataref, $i, 1, @chunks ); } } + + # don't duplicate
...tags + my $count_pre = 0; + for my $i ( 0..$#{$dataref} ) { + if( ${$dataref}[$i] =~ /\A\s+/ ){ + if ($count_pre > 0) { + ${$dataref}[$i-$count_pre] .= "\n\n" . ${$dataref}[$i]; + ${$dataref}[$i] = ""; + } + $count_pre++; + } else { + $count_pre = 0; + } + } + } @@ -1588,7 +1603,7 @@ if( ! defined( $linktext ) ){ $linktext = $section; $linktext .= " in " if $section && $page; - $linktext .= "the $page manpage" if $page; + $linktext .= "$page" if $page; } ### print STDERR "got page/section url=$url\n"; last RESOLVE; @@ -1754,7 +1769,7 @@ if ($page eq "") { $link = "#" . anchorify( $section ); } elsif ( $page =~ /::/ ) { - $page =~ s,::,/,g; + # $page =~ s,::,/,g; # Search page cache for an entry keyed under the html page name, # then look to see what directory that page might be in. NOTE: # this will only find one page. A better solution might be to produce @@ -1801,9 +1816,9 @@ ### print STDERR "...section=$section\n"; # check if there is a .pod with the page name - if ($pages{$page} =~ /([^:]*)\.pod:/) { + if ($pages{$page} =~ /\/([^:]*?)\.pod:/) { $link = "$htmlroot/$1.html$section"; - } elsif ($pages{$page} =~ /([^:]*)\.pm:/) { + } elsif ($pages{$page} =~ /\/([^:]*?)\.pm:/) { $link = "$htmlroot/$1.html$section"; } else { $link = "";