You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>, <i>, <b>, <u>, <mark>, and <bdi> if a unique, matching class value is found in inline and literal elements. Use <ins> and <del> if a unique matching class value is found in inline, literal, or container elements. Use <small> for generated code line numbers.
This appears to conflict with the signature line generated by autodoc, which adds Pygment classes to certain nodes:
I should mention I also tried returning multiple classes like ["pygments", "s"],
but all that earned me from docutils was a <s class="pygments">...</s>
Describe the bug
In docutils version 0.17, the following change was made:
This appears to conflict with the signature line generated by autodoc, which adds Pygment classes to certain nodes:
sphinx/sphinx/addnodes.py
Lines 332 to 334 in ecee233
The result is a rather funky looking signature with an unusual DOM:


This can be fixed by changing the added class to something like


pygments-s
:That said, the above probably won't play nicely with the many existing pygment stylesheets, so I don't really know the best approach.
How to Reproduce
Use a
typing.Literal['foo']
in an autodoc'ed signature line.Expected behavior
No response
Your project
qiime2/qiime2#610
Screenshots
No response
OS
Linux
Python version
3.8
Sphinx version
4.3
Sphinx extensions
sphinx.ext.autodoc
Extra tools
Firefox/Chrome
Additional context
No response
The text was updated successfully, but these errors were encountered: