Skip to content

Change single backticks in Sphinx to render as code #13519

@asmeurer

Description

@asmeurer

Right now single backticks, like `this` in a docstring render as math. You need double backticks like ``this`` to render as code.

This confuses just about everyone because it's different from markdown, which is what GitHub uses for comments and so on.

Apparently you can set the single backticks to anything. I think the mathjax extension just sets it to math by default.

We do have a decent amount of math in our docstrings, but you can also use :math:`math`. I wonder if it would also be possible to make it use dollar signs. I suspect for every docstring currently using single backquotes for math there are two using it incorrectly for code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions