Skip to content

Section permalink html anchors are wrong #48210

Closed

Description

@ronny
mannequin
BPO 3960
Nosy @birkenfeld

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 = <Date 2008-09-25.12:54:59.126>
created_at = <Date 2008-09-25.12:41:47.935>
labels = ['type-bug', 'docs']
title = 'Section permalink html anchors are wrong'
updated_at = <Date 2008-09-28.09:14:40.052>
user = 'https://bugs.python.org/ronny'

bugs.python.org fields:

activity = <Date 2008-09-28.09:14:40.052>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-09-25.12:54:59.126>
closer = 'georg.brandl'
components = ['Documentation tools (Sphinx)']
creation = <Date 2008-09-25.12:41:47.935>
creator = 'ronny'
dependencies = []
files = []
hgrepos = []
issue_num = 3960
keywords = []
message_count = 6.0
messages = ['73783', '73784', '73786', '73831', '73832', '73963']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'ronny']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3960'
versions = ['Python 2.5']

Activity

  1. ronny commented on Sep 25, 2008

    ronnymannequin
    MannequinAuthor

    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.

  2. added
    docsDocumentation in the Doc dir
    type-bugAn unexpected behavior, bug, or error
    on Sep 25, 2008
  3. ronny commented on Sep 25, 2008

    ronnymannequin
    MannequinAuthor

    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.

  4. birkenfeld commented on Sep 25, 2008

    @birkenfeld
    Member

    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.

  5. ronny commented on Sep 26, 2008

    ronnymannequin
    MannequinAuthor

    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".

  6. ronny commented on Sep 26, 2008

    ronnymannequin
    MannequinAuthor

    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.

  7. birkenfeld commented on Sep 28, 2008

    @birkenfeld
    Member

    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.

  8. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions