Uh oh!
There was an error while loading. Please reload this page.
Fix id names in rst renders after docutils 0.18 - #2081
Conversation
There was a problem hiding this comment.
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_prefixoverride in the Docutilssettings_overridesused by therest2htmlrenderer.
Show a summary per file
| File | Description |
|---|---|
lib/github/commands/rest2html | Overrides 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
Uh oh!
There was an error while loading. Please reload this page.
pudiva
commented
Jun 30, 2026
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
commented
Jun 30, 2026
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
commented
Jun 30, 2026
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? |
Uh oh!
There was an error while loading. Please reload this page.
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>
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