Skip to content
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

s-a-t breaks default_role in parameter descriptions #421

Closed
flying-sheep opened this issue Jan 26, 2024 · 0 comments · Fixed by #422
Closed

s-a-t breaks default_role in parameter descriptions #421

flying-sheep opened this issue Jan 26, 2024 · 0 comments · Fixed by #422

Comments

@flying-sheep
Copy link
Contributor

flying-sheep commented Jan 26, 2024

When using sphinx-autodoc-typehints, text between single backticks in parameter descriptions gets rendered as <cite/> nodes, i.e. using docutils’ default title-reference role instead of the role we configured.

I don’t know exactly why, but removing s-a-t from the plugin list fixes this, and you’re e.g. using a plain RstParser() instance in several places which has that behavior. Maybe that parser replaces the role and doesn’t clean up properly after itself?

RstParser().parse("\n".join(lines), doc)

Check out sphinx.testing.restructuredtext:parse for a parser setup that sets up all the Sphinx stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant