Skip to content

Fix id names in rst renders after docutils 0.18 - #2081

Merged
pudiva merged 1 commit into
masterfrom
rst-auto-id-prefix
Jul 1, 2026
Merged

Fix id names in rst renders after docutils 0.18#2081
pudiva merged 1 commit into
masterfrom
rst-auto-id-prefix

Conversation

@pudiva

@pudivapudiva commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fix id names changing in rst renders with the upgrade to docutils 0.18 by enforcing the old default value for auto_id_prefix.

See: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26

co-authored-by: @TylerDixon

CopilotAI review requested due to automatic review settings June 30, 2026 15:32
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 15:33View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 15:33

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to stabilize reStructuredText (Docutils) HTML anchor/id generation after upgrading to Docutils 0.18 by explicitly setting auto_id_prefix to the pre-upgrade default.

Changes:

  • Adds an explicit auto_id_prefix override in the Docutils settings_overrides used by the rest2html renderer.
Show a summary per file
FileDescription
lib/github/commands/rest2htmlOverrides Docutils settings to control how automatic IDs are generated in rendered HTML.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment threadlib/github/commands/rest2html
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from 0f716e8 to 24f8e1fCompareJune 30, 2026 16:30
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 16:30View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 16:31
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from 9b3bdad to d9f8ee6CompareJune 30, 2026 17:05
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 17:05View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 17:06
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from d9f8ee6 to 5c2f877CompareJune 30, 2026 17:22
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 17:22View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 17:23
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from 5c2f877 to e329f55CompareJune 30, 2026 17:26
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 17:27View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 17:27
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from e329f55 to d7b5b51CompareJune 30, 2026 17:32
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 17:33View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 17:33
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from d7b5b51 to d1da2c3CompareJune 30, 2026 17:35
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 17:35View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 17:35
@pudiva

Copy link
Copy Markdown
ContributorAuthor

i don't get why the tests are failing... it looks like they're stuck running 0470db7 even though i force pushed to d1da2c3 ...

Fix id names changing in rst renders with the upgrade to docutils 0.18
by enforcing the old default value `id` for `auto_id_prefix`.
See: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26
co-authored-by: Tyler Dixon <tylerdixon@github.com>
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from d1da2c3 to a5d7bbeCompareJune 30, 2026 18:47
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 18:47
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from a5d7bbe to c430d21CompareJune 30, 2026 18:56
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 18:56View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 18:57
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from c430d21 to f0c175dCompareJune 30, 2026 19:03
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 19:03View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 19:04
@pudiva

Copy link
Copy Markdown
ContributorAuthor

oh okay it's because those were running on the merge with the master branch... so i rebased on top of it instead of v6.0.0 and it's passing...

@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from f0c175d to 0b012a4CompareJune 30, 2026 20:31
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 20:31View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 20:31
@pudiva
pudivaforce-pushed the rst-auto-id-prefix branch from 0b012a4 to a5d7bbeCompareJune 30, 2026 20:32
GitHub Advanced Securitystarted work on behalf of pudivaJune 30, 2026 20:32View session
GitHub Advanced Securityfinished work on behalf of pudivaJune 30, 2026 20:33
@pudiva

Copy link
Copy Markdown
ContributorAuthor

i had to base this on top of v6.0.0 because master already has unreleased changes that cause other problems for me. could someone help me figure out the right way to incorporate this change in the codebase?

@pudiva
pudiva merged commit aca8395 into masterJul 1, 2026
12 of 18 checks passed
@pudiva
pudiva deleted the rst-auto-id-prefix branch July 1, 2026 12:13
zkoppert added a commit that referenced this pull request Jul 10, 2026
PR #2081 set auto_id_prefix: 'id' in lib/github/commands/rest2html to keep
the pre-docutils-0.18 anchor id scheme, but the committed RST fixtures still
held the docutils-0.18 default (toc-entry-N). The rendered output therefore
never matched the fixtures, so test_rst, test_long.rst, and test_toc.rst
failed on master and on every PR built from it.
I regenerated README.rst.html, README.long.rst.html, and README.toc.rst.html
against the CI-pinned docutils 0.22.4 so the fixtures use the idN scheme that
the auto_id_prefix: 'id' setting actually produces, honoring #2081's intent.
Signed-off-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pudiva@TylerDixon