Skip to content

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

Closed
@flying-sheep

Description

@flying-sheep

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions