fix: RST table of contents link formatting blocking publish#583
Merged
Conversation
The TOC generator emitted self-referential indirect hyperlink targets (`Text <Text_>`_) for each entry. These collide with the identically named implicit section targets, which newer docutils (used by PyPI's readme_renderer) rejects with an ERROR, causing the long_description to fail rendering and the PyPI upload to return HTTP 400. Emit simple phrase references (`Text`_) that point directly at the implicit section targets instead. Older docutils tolerated the previous form, so local rstcheck passed while PyPI upload failed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PvMnQEiprU5XKUHukXEpAJ
razor-x
marked this pull request as ready for review
July 21, 2026 20:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the reStructuredText (RST) table of contents formatting in the README by removing redundant anchor text from internal links.
Key Changes
README.rst: Updated all table of contents links to use simplified RST reference syntax
\Text <Text_>`format to`Text`` formatgenerate-readme-toc.js: Updated the TOC generation script to match the new format
Implementation Details
The simplified RST link format
\Text`is equivalent to the explicit format`Text <Text>`_` when the link text exactly matches the section heading. This change improves readability of the source documentation while maintaining identical rendering in the final output.https://claude.ai/code/session_01PvMnQEiprU5XKUHukXEpAJ