Skip to content

gh-155799: Fix incorrect anchor links - #155800

Open
rosstitmarsh wants to merge 1 commit into
python:mainfrom
rosstitmarsh:fix-issue-155799
Open

gh-155799: Fix incorrect anchor links#155800
rosstitmarsh wants to merge 1 commit into
python:mainfrom
rosstitmarsh:fix-issue-155799

Conversation

@rosstitmarsh

@rosstitmarsh rosstitmarsh commented Aug 14, 2026

Copy link
Copy Markdown

Fixed by swapping the heading and index directive.

This has resolved #private-name-mangling and #memoryview-objects.

However I cannot see why #identifiers-names is still wrong. It is identical to the "Literals" heading which is correct.

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Aug 14, 2026
@python-cla-bot

python-cla-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Aug 14, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34069677 | 📁 Comparing 90f8686 against main (6611f4d)

  🔍 Preview build  

2 files changed
± c-api/memoryview.html
± reference/expressions.html

Comment thread Doc/c-api/memoryview.rst

.. _memoryview-objects:

.. index::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting the Sphinx documentation:

Since index directives generate cross-reference targets at their location in the source, it makes sense to put them before the thing they refer to – e.g. a heading

As such I'm not sure about this change, the missing anchor should be fixed upstream instead. Possibly something to do with the reference label messing with the anchor? I suggest you open an issue in sphinx-doc/sphinx repository.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every other adjacent file I looked in has it heading then index so I thought that was the convention here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants