develooper Front page | perl.perl5.porters | Postings from August 2018

Re: [perl #133432] perlvar.pod incorrect link

Thread Previous
From:
Dan Book
Date:
August 12, 2018 16:46
Subject:
Re: [perl #133432] perlvar.pod incorrect link
Message ID:
CABMkAVU4b+U2sfVdPoM4HnCjcGJa2FCL3DWHpZ02D+oG9FmxNQ@mail.gmail.com
On Sun, Aug 12, 2018 at 11:23 AM James E Keenan via RT <
perlbug-followup@perl.org> wrote:

> On Wed, 08 Aug 2018 20:58:44 GMT, grinnz@gmail.com wrote:
> > The link in the @{^CAPTURE} section to $<digits> is not correct. It's
> > currently L</$I<digits>> which ends up linking to $digits (which doesn't
> > exist). The correct link would currently be:
> >
> > L<<< /$<I<digits>> ($1, $2, ...) >>>
>
> I tried out your suggestion in this branch:
>
> jkeenan/dbook/133440-perlvar
>
> I ran the revised file through pod2html.  When I clicked on the resulting
> hyperlink, it did not jump to the intended location.
>
> (I tried out a couple of other things, which created a jumpable link but
> failed to pass t/porting/podcheck.t.)
>
> Suggestions?
>

I think this is a bug in Pod::Simple::HTML, I don't know if there is a way
to generate a link to that anchor. In Pod::Simple::XHTML, which is used by
most websites rendering perldocs now, the mentioned link tag works.

perl -MPod::Simple::XHTML -E'my $parser = Pod::Simple::XHTML->new;
$parser->anchor_items(1); $parser->parse_string_document("=pod\n\nL<<<
/\$<I<digits>> (\$1, \$2, ...) >>>\n\n=over\n\n=item \$<I<digits>> (\$1,
\$2, ...) >>>\n\n=back")'

-Dan

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About