You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Link fixer fails to process cross-references in document body, causing malformed double-hash hrefs #123
When using Sphinx Python domain cross-references (:py:obj:, :type:, etc.) in a SingleHTML build with SimplePDF, the generated hrefs contain malformed double-hash patterns like: href="#document-api_reference/python_api/mypackage/index#mypackage.MyClass"
These links don't work in the browser and error like below is also shown during build: ERROR: No anchor #document-api_reference/python_api/mypackage/abc/index#abc.def.ghi for internal URI reference
Expected Behavior
Hrefs should contain only the anchor: href="#mypackage.MyClass"
Minimal Reproducible Example
RST source:
`.. py:class:: MyClass
Example class.
.. py:attribute:: config
:type: MyClass
References :py:obj:MyClass.`
Configuration
Sphinx: 8.2+
sphinx-simplepdf: 1.6.0
Extensions: sphinx-autoapi (generates API docs with :py:obj: references)
Multi-project documentation build
I created a PR for this issue, #133
The fix is relatively simple, but I'm sure someone with a better understanding of the internals could come up with a better solution.
Would be nice, if this could be resolved soon, as this is a pretty version-breaking issue in my opinion.
This appears to be the Sphinx 8.2+ singlehtml regression addressed by sphinx-doc/sphinx#14241.
That PR restores SingleFileHTMLBuilder.fix_refuris() calls for the assembled document and TOCs, preventing links such as #document-path#real-anchor from reaching the HTML output. Since SimplePDF inherits this builder, it should benefit from the upstream fix.
Activity
0kelvin0 commentedon Dec 19, 2025
Seems like it also happens when we do section label
See :ref:
some-filespatrick-sil commentedon Feb 17, 2026
I created a PR for this issue, #133
The fix is relatively simple, but I'm sure someone with a better understanding of the internals could come up with a better solution.
Would be nice, if this could be resolved soon, as this is a pretty version-breaking issue in my opinion.
jdillard commentedon Sep 30, 2026
This appears to be the Sphinx 8.2+
singlehtmlregression addressed by sphinx-doc/sphinx#14241.That PR restores
SingleFileHTMLBuilder.fix_refuris()calls for the assembled document and TOCs, preventing links such as#document-path#real-anchorfrom reaching the HTML output. Since SimplePDF inherits this builder, it should benefit from the upstream fix.