You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/birkenfeld'closed_at=<Date2008-09-25.12:54:59.126>created_at=<Date2008-09-25.12:41:47.935>labels= ['type-bug', 'docs']
title='Section permalink html anchors are wrong'updated_at=<Date2008-09-28.09:14:40.052>user='https://bugs.python.org/ronny'
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/htmlwriter.py, lines 71 and 373.
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.
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".
ronny commented on Sep 26, 2008
ronnymannequin
MannequinAuthor
More actions
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.
Activity
ronny commentedon Sep 25, 2008
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/htmlwriter.py, lines 71 and 373.
ronny commentedon Sep 25, 2008
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.
birkenfeld commentedon Sep 25, 2008
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.
ronny commentedon Sep 26, 2008
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".
ronny commentedon Sep 26, 2008
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.
birkenfeld commentedon Sep 28, 2008
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.