readthedocs / sphinx-hoverxref

Sphinx extension to show tooltips with content embedded when hover a reference.
https://sphinx-hoverxref.readthedocs.io/
MIT License
96 stars 40 forks source link

Broken rendering of 'usage' page on readthedocs #280

Closed EFord36 closed 6 months ago

EFord36 commented 6 months ago

Hi,

I was reading the docs at https://sphinx-hoverxref.readthedocs.io/en/latest/usage.html

and noticed the page "Tooltip with content that needs extra rendering steps" onwards rendering strangely:

image

that screenshot was for Chrome on an M2 Mac, it also affects safari in the same way:

Screenshot 2024-02-09 at 11 33 41

This seems unintentional to me, so thought I would open an issue.

I had a quick look but didn't see an obvious problem - is it perhaps the use of the .. bibliography:: directive in the previous section causing the issue, perhaps sphinxcontrib-bibtex expects the bibliography to always be at the end of a page? I had a quick look at that code and couldn't see a smoking gun either, but I could just not know what I'm looking at.

humitos commented 6 months ago

Thanks for reporting this. Would you like to take a look at this and propose a PR to fix it? 😄

EFord36 commented 6 months ago

Sure, I can give it a go!

EFord36 commented 6 months ago

I've just looked at this, and actually, installing fresh and building, there's no problems. I diff-ed the live docs with my built version, and saw that the live docs were built with docutils 0.18.0. Downgrading to that version and building locally causes the error, so it looks like it's the docutils version (combined with other versions of packages presumably) that's the problem. I opened #281 to add a minimum version of docutils, but presumably anything that triggers a rebuild of the live readthedocs docs would fix the current problem (assuming it ends up with a fresh enough python environment).