* "David E. Wheeler" <[email protected]> [2012-06-07T12:02:55]
> > 
> > <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.
> 
> So, should Pod::Simple’s HTML output:
> 
> * Strip links from head elements; or
> * Exclude head elements with links from the TOC; or
> * Something else?

If I understand things correctly, then when you say L<foo> in something that
becomes a section header, the TOC links to it by doing something morally
equivalent to L<L<foo>|/foo>, which is obviously nuts.

Restated:

  * =head2 L<bar|foo> becomes "<a id='head1_foo' href='foo'>bar</a>"
  * the TOC links with <a href="#head1_foo"><a href='foo'>bar</a></a>

The text of the link in the TOC should be the same as the text of the thing to
which it's linking.  So the TOC should link with:

  <a href="#head1_foo">bar</a>

...and if you'd said (you can say this, right?) "L<< The B<Big> Bang|boom >>"
then the TOC should have something like:

  <a href="#head1_boom">The <strong>Big</strong> Bang</a>

This email has received about 120s of thought, so it might be a terrible idea.
It feels pretty sound, though.  (Oh, but I totally punted on the #-anchors
there.  They weren't really at issue, right?)

-- 
rjbs

Attachment: signature.asc
Description: Digital signature

Reply via email to