Closed shiftinv closed 1 year ago
Would you mind updating this to be based on version 1.2.0?
@shiftinv @onerandomusername I just released 1.3.0. Please, let me know if it works as you expected 💯
@humitos Awesome, much appreciated! Everything seems to be working fine, all references are now being found :tada:
Intersphinx supports explicitly specifying the inventory name in a link target, e.g. the
python:
part in:ref:`python:datetime-datetime`
.The custom
missing_reference
hook in hoverxref handles such target names as well, but only in thestd
domain (as far as I can tell, particularly for:ref:
, which is in thestd
domain).Intersphinx supports target names with explicit inventories regardless of role/domain, which means
:py:attr:`python:datetime.time.minute`
results in the correct link, but without the hoverxref popup as thepython:
prefix isn't handled by hoverxref in this case.This PR attempts to fix this by removing the check for the
std
domain, which I believe intersphinx also doesn't check.I'm very much not sure if this makes sense with how Sphinx, Intersphinx and sphinx-hoverxref interact, or if there are side-effects, I don't know a whole lot about Sphinx internals :sweat_smile: Nevertheless, this fixes the aforementioned issue, and tests pass fine :)
The difference between sphinx-hoverxref 1.2.0 and this PR can be seen here:
Note the difference on the second
:attr:
link, while hovering over the second:ref:
link works in both versions.:books: Documentation preview :books:: https://sphinx-hoverxref--236.org.readthedocs.build/en/236/
:books: Documentation preview :books:: https://read-the-docs-sphinx-hoverxref--236.com.readthedocs.build/en/236/