Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 77686
Status: resolved
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: bkb [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.22
Fixed in: 3.24



This bug report relates to the following: https://github.com/CPAN-API/metacpan-web/issues/597 When Pod::Simple::XHTML is run on the most recent version of perldelta, wget http://api.metacpan.org/source/ZEFRAM/perl-5.17.0/pod/perldelta.pod it creates a doubled link in the index, like this: <a href="#perldata"><a href="http://search.cpan.org/perldoc? perldata">perldata</a></a></li> This is caused by the L<perldata> heading in perldelta.pod.
Subject: test.pl
#!/home/ben/software/install/bin/perl use warnings; use strict; use File::Slurp; use Pod::Simple::XHTML; use Test::More tests => 1; my $c = read_file ('perldelta.pod'); my $d = Pod::Simple::XHTML->new (); $d->index (1); my $e; $d->output_string (\$e); $d->parse_string_document ($c); unlike ($e, qr!\Q<a href="#perldata"><a href="http://search.cpan.org/perldoc?perldata">perldata</a></a></li>!);
So I think the things to do are: * In the TOC item, include only the text from the head element, not any link. * In the head element, make sure there is only one anchor, and that it has both the ID and the href. IOW, make sure both items have only one anchor, not two nested. Sound right? David
On Thu Jun 07 12:53:53 2012, DWHEELER wrote: Show quoted text
> So I think the things to do are: > > * In the TOC item, include only the text from the head element, not > any link. > * In the head element, make sure there is only one anchor, and that it > has both the ID and the > href. > > IOW, make sure both items have only one anchor, not two nested. Sound > right?
I think it's right.
Subject: Re: [rt.cpan.org #77686]
Date: Sat, 9 Jun 2012 13:33:08 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Jun 8, 2012, at 9:39 PM, Ben Bullock via RT wrote: Show quoted text
Thanks. I cherry-picked your test case, but came up with a different solution that caches the plain text for use in the TOC, rather than needing to strip HTML from it later. https://github.com/theory/pod-simple/commit/29306b765cc859f139655c34528e9b510a0452d9 Best, David