This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Section permalink html anchors are wrong
Type: behavior Stage:
Components: Documentation tools (Sphinx) Versions: Python 2.5
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, ronny
Priority: normal Keywords:

Created on 2008-09-25 12:41 by ronny, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg73783 - (view) Author: Ronny Haryanto (ronny) Date: 2008-09-25 12:41
With sphinx svn version 66617, generated html docs have invalid html 
anchors: <a class="headerlink" href="#blah"> instead of <a 
class="headerlink" name="blah">.

Affected file: sphinx/, lines 71 and 373.
msg73784 - (view) Author: Ronny Haryanto (ronny) Date: 2008-09-25 12:44
Sorry, forgot to mention that this happened to the generated Django html 
documentations (django svn r9084), if it makes any difference.

After fixing the two lines (as I mentioned), all named link works again.
msg73786 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-25 12:54
Actually this is all right. The generated HTML looks like this:
<span id="blah"></span><h3>Blah<a class="headerlink" href="#blah"
title="Permalink to this headline">¶</a></h3>

So the id is in the span tag, not the a tag. The link generated for the
¶ is a convenience so that you can right-click and say "copy link
location" if you want to have a URL pointing to that heading.
msg73831 - (view) Author: Ronny Haryanto (ronny) Date: 2008-09-26 03:06
I should have mentioned that this breaks in-document links, e.g. clicking 
on <a href="#blah">blah</a> will not bring you to <span 
id="blah"></span><a href="#blah">...</a>.

My point is that the attribute should be "name" instead of "href".
msg73832 - (view) Author: Ronny Haryanto (ronny) Date: 2008-09-26 03:25
Sorry, Georg, I just realized what you meant. You're right. But would it 
be possible to add "name" *in addition to* "href" so that clicking on in-
document links (e.g. in Table of Contents) would still work? Thanks.
msg73963 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-28 09:14
I don't see that inter-document links *wouldn't* work, except on antique
browsers that insist on <a name> tags only for defining anchors.
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48210
2008-09-28 09:14:40georg.brandlsetmessages: + msg73963
2008-09-26 03:25:07ronnysetmessages: + msg73832
2008-09-26 03:06:45ronnysetmessages: + msg73831
2008-09-25 12:54:59georg.brandlsetstatus: open -> closed
resolution: wont fix
messages: + msg73786
2008-09-25 12:44:51ronnysetmessages: + msg73784
2008-09-25 12:41:47ronnycreate