This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
automatic titling in Pod::Html
authorZefram <zefram@fysh.org>
Wed, 13 Dec 2017 22:59:28 +0000 (22:59 +0000)
committerZefram <zefram@fysh.org>
Wed, 13 Dec 2017 23:00:04 +0000 (23:00 +0000)
commit38e30ca7507a601c2d84596bc51d88c0f3c516b4
tree1db8590f395e8e7c3f685ace048a6acb4de53ba9
parent7d5ed5d0f107110d6b559148f4f68a8dd26aee46
automatic titling in Pod::Html

Automatic extraction of a title from the content was lost with the
switch to using Pod::Simple::XHTML for rendering.  It would be tricky
to add in Pod::Simple::XHTML, or anything else integrated into that
parser, because the stream-oriented approach plays poorly with any kind
of lookahead.  Instead go to a two-stage conversion, parsing the input
to tree form using Pod::Simple::SimpleTree and later feeding the tree
to the stream-oriented Pod::Simple::XHTML for output.  Between the two
stages, extract a default title from the tree, in time to use it when
setting options for Pod::Simple::XHTML.  Fixes [perl #110520].
12 files changed:
ext/Pod-Html/lib/Pod/Html.pm
ext/Pod-Html/t/crossref.t
ext/Pod-Html/t/crossref2.t
ext/Pod-Html/t/crossref3.t
ext/Pod-Html/t/htmldir1.t
ext/Pod-Html/t/htmldir2.t
ext/Pod-Html/t/htmldir3.t
ext/Pod-Html/t/htmldir4.t
ext/Pod-Html/t/htmldir5.t
ext/Pod-Html/t/htmlescp.t
ext/Pod-Html/t/htmllink.t
ext/Pod-Html/t/htmlview.t