New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autodoc strips spaces from values #8446
Comments
It is converted to the following HTML:
The four spaces are kept as is. But HTML browsers consider them as one space. It should be escaped on generating HTML. |
Got it, thanks for the explanation. I can probably tackle this if no one has started working it yet. Looks like HTMLTranslator in sphinx/writers/html.py is a logical starting point? |
I still don't have time to investigate this yet. So I don't have an answer for your question. But it and |
…space In HTML, consective spaces are considered as single space by HTML browsers. To represent them as is, we have to escape them on rendering them into HTML. This starts to escape the whole of desc_signature node.
…space In HTML, consective spaces are considered as single space by HTML browsers. To represent them as is, we have to escape them on rendering them into HTML. This starts to escape the whole of desc_signature node.
… space In HTML, consecutive spaces are considered as single space by HTML browsers. To represent them as is, we have to escape them on rendering them into HTML. This starts to escape the whole of desc_signature node.
… space In HTML, consecutive spaces are considered as single space by HTML browsers. To represent them as is, we have to escape them on rendering them into HTML. This starts to escape the whole of desc_signature node.
…signatures Fix #8446: html: consecutive spaces are displayed as single space
If I define a module level data as:
and in my .rst file
It is rendered as as a single space
Expected result is four spaces as defined in .py file.
Same result if defined with
.. data::
directive.The text was updated successfully, but these errors were encountered: