Open wrobell opened 1 year ago
Looks okay to me at both https://docs.hylang.org/en/master/api.html#hy.read and https://docs.hylang.org/en/stable/api.html#hy.read in Firefox 108 with mostly default settings:
Are you sure this is our bug and not a bug in your web browser? Even if the CSS is wrong, I bet the CSS in question is upstream in the Read the Docs theme or something, and not in this repository.
I think this might be the problem in conf.py
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
I believe this is no longer required, and prevents loading of some of CSS (if I remember well) properly on Webkit based browsers.
Confirmed on MacOS Safari Version 16.5.2 (18615.2.9.11.10). Commenting out the html_theme_path
setting didn't fix it for me either, seems to be some sort of issue with Safari collapsing whitespace (but I don't have time right now to dig into it).
I can confirm the issue with
It is fine on Firefox indeed.
BTW. I tried to build documentation locally using Python 11 and Sphinx 7. I get error that sphinxcontrib.hydomain
cannot be found. Manually:
>>> import sphinxcontrib.hydomain
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/wrobell/projects/hy/.venv-3.11/lib/python3.11/site-packages/sphinxcontrib/hydomain.py", line 41, in <module>
from sphinx.pycode.ast import parse as ast_parse
ImportError: cannot import name 'parse' from 'sphinx.pycode.ast' (/home/wrobell/projects/hy/.venv-3.11/lib/python3.11/site-packages/sphinx/pycode/ast.py)
This https://github.com/sphinx-doc/sphinx/pull/11371/files hints to use ast.parse
.
Also
html_use_smartypants
is deprecated: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_use_smartypantsTry pip install -r requirements-dev.txt
.
Try
pip install -r requirements-dev.txt
.
This is what I did, but I gave up seeing Sphinx 5 ;)
But it works. That's how the manual is built currently. Try it if you don't believe me.
I know, but there is no point dealing with Sphinx 5 to debug the original issue - maybe it is fixed in Sphinx 7.
Maybe, but you may also find it an uphill battle to get sphinxcontrib-hydomain
to work with Sphinx 7.
Maybe, but you may also find it an uphill battle to get
sphinxcontrib-hydomain
to work with Sphinx 7.
I might try. Any specific example of problems?
I don't remember. I've generally only done the minimum to get sphinxcontrib-hydomain
when it breaks.
I can replicate this in Thorium 109, so that seems to confirm this issue is related to WebKit and its descendants. I also find that while hy:autofunction:: hy.read
has the spacing issue, autofunction:: hy.read
doesn't. I conclude that this is a problem with sphinxcontrib-hydomain
.
BTW. Hyrule uses different theme, and does not suffer from the same problem.
For example I see
(hy.readstreamfilenamereader)
I would, probably, expect
(hy.read stream filename reader)
Screenshot (I hope as raising the issue from a phone :/)