Skip to content

Commit 61b2173

Browse files
razor-xclaude
andauthored
fix: render TOC hyperlinks as simple references for PyPI (#583)
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. Claude-Session: https://claude.ai/code/session_01PvMnQEiprU5XKUHukXEpAJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent db018e1 commit 61b2173

2 files changed

Lines changed: 32 additions & 32 deletions

File tree

README.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,67 +29,67 @@ accurate and fully typed.
2929
Contents
3030
--------
3131

32-
* `Installation <Installation_>`_
32+
* `Installation`_
3333

34-
* `Usage <Usage_>`_
34+
* `Usage`_
3535

36-
* `Examples <Examples_>`_
36+
* `Examples`_
3737

38-
* `List devices <List devices_>`_
38+
* `List devices`_
3939

40-
* `Unlock a door <Unlock a door_>`_
40+
* `Unlock a door`_
4141

42-
* `Authentication Method <Authentication Method_>`_
42+
* `Authentication Method`_
4343

44-
* `API Key <API Key_>`_
44+
* `API Key`_
4545

46-
* `Personal Access Token <Personal Access Token_>`_
46+
* `Personal Access Token`_
4747

48-
* `Action Attempts <Action Attempts_>`_
48+
* `Action Attempts`_
4949

50-
* `Pagination <Pagination_>`_
50+
* `Pagination`_
5151

52-
* `Manually fetch pages with the nextPageCursor <Manually fetch pages with the nextPageCursor_>`_
52+
* `Manually fetch pages with the nextPageCursor`_
5353

54-
* `Resume pagination <Resume pagination_>`_
54+
* `Resume pagination`_
5555

56-
* `Iterate over all resources <Iterate over all resources_>`_
56+
* `Iterate over all resources`_
5757

58-
* `Return all resources across all pages as a list <Return all resources across all pages as a list_>`_
58+
* `Return all resources across all pages as a list`_
5959

60-
* `Interacting with Multiple Workspaces <Interacting with Multiple Workspaces_>`_
60+
* `Interacting with Multiple Workspaces`_
6161

62-
* `Webhooks <Webhooks_>`_
62+
* `Webhooks`_
6363

64-
* `Advanced Usage <Advanced Usage_>`_
64+
* `Advanced Usage`_
6565

66-
* `Setting the endpoint <Setting the endpoint_>`_
66+
* `Setting the endpoint`_
6767

68-
* `Development and Testing <Development and Testing_>`_
68+
* `Development and Testing`_
6969

70-
* `Quickstart <Quickstart_>`_
70+
* `Quickstart`_
7171

72-
* `Source Code <Source Code_>`_
72+
* `Source Code`_
7373

74-
* `Requirements <Requirements_>`_
74+
* `Requirements`_
7575

76-
* `Tests <Tests_>`_
76+
* `Tests`_
7777

78-
* `Publishing <Publishing_>`_
78+
* `Publishing`_
7979

80-
* `Automatic <Automatic_>`_
80+
* `Automatic`_
8181

82-
* `Manual <Manual_>`_
82+
* `Manual`_
8383

84-
* `GitHub Actions <GitHub Actions_>`_
84+
* `GitHub Actions`_
8585

86-
* `Secrets for Optional GitHub Actions <Secrets for Optional GitHub Actions_>`_
86+
* `Secrets for Optional GitHub Actions`_
8787

88-
* `Contributing <Contributing_>`_
88+
* `Contributing`_
8989

90-
* `License <License_>`_
90+
* `License`_
9191

92-
* `Warranty <Warranty_>`_
92+
* `Warranty`_
9393

9494
Installation
9595
------------

generate-readme-toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function generateTableOfContents(content) {
4747
headings.forEach((heading) => {
4848
const indent = ' '.repeat(heading.level - 1)
4949

50-
toc.push(`${indent}* \`${heading.text} <${heading.text}_>\`_`)
50+
toc.push(`${indent}* \`${heading.text}\`_`)
5151
toc.push('')
5252
})
5353

0 commit comments

Comments
 (0)