Problem
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