Index: lib/DocSet/Doc/HTML2HTML.pm =================================================================== RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/HTML2HTML.pm,v retrieving revision 1.2 diff -u -r1.2 HTML2HTML.pm --- lib/DocSet/Doc/HTML2HTML.pm 5 Feb 2002 10:27:19 -0000 1.2 +++ lib/DocSet/Doc/HTML2HTML.pm 11 Jun 2002 22:10:46 -0000 @@ -20,6 +20,7 @@ my $vars = { meta => $self->{meta}, body => \@body, + headers => $self->{parsed_tree}{head}, dir => $self->{dir}, nav => $self->{nav}, last_modified => $self->{timestamp}, Index: lib/DocSet/Doc/POD2HTML.pm =================================================================== RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/POD2HTML.pm,v retrieving revision 1.5 diff -u -r1.5 POD2HTML.pm --- lib/DocSet/Doc/POD2HTML.pm 29 Apr 2002 17:36:55 -0000 1.5 +++ lib/DocSet/Doc/POD2HTML.pm 11 Jun 2002 22:10:46 -0000 @@ -48,6 +48,7 @@ meta => $self->{meta}, toc => $self->{toc}, body => \@body, + headers => '', dir => $self->{dir}, nav => $self->{nav}, last_modified => $self->{timestamp}, Index: lib/DocSet/Source/HTML.pm =================================================================== RCS file: /home/cvs/modperl-docs/lib/DocSet/Source/HTML.pm,v retrieving revision 1.6 diff -u -r1.6 HTML.pm --- lib/DocSet/Source/HTML.pm 14 Apr 2002 06:17:48 -0000 1.6 +++ lib/DocSet/Source/HTML.pm 11 Jun 2002 22:10:46 -0000 @@ -126,23 +126,46 @@ { # this one retrieves and stashes away the description (As 'abstract') # and the body and the title of the given html + my $in_head = 0; my $start_h = sub { - my($self, $tagname, $attr) = @_; + my($self, $tagname, $attr, $text) = @_; + + # special treatment if ($tagname eq 'meta' && lc $attr->{name} eq 'description') { $self->{parsed_tree}->{abstract} = $attr->{content}; } + elsif ($tagname eq 'head') { + $in_head = 1; + $self->{parsed_tree}{head} = ''; + } + elsif ($in_head and $tagname ne 'title') { # title needs its own treatment + $self->{parsed_tree}{head} .= $text; + } }; my $end_h = sub { my($self, $tagname, $skipped_text) = @_; # use $p itself as a tmp storage (ok according to the docs) + if ($tagname eq 'title' or $tagname eq 'body') { # get special treatment $self->{parsed_tree}->{$tagname} = $skipped_text; + } + elsif ($tagname eq 'head') { # , our section is finished. + $in_head = 0; + } + # block elements like