Skip to content

sphinx-lint incorrectly rejects math directives with line wraps in table cells #123

@lpsinger

Description

@lpsinger

The following is valid reStructuredText/Sphinx with line-wrapped math directives inside table cells:

Math in Table
=============

+-----------+---------------+---------------+
| Shape     | Area          | Perimeter     |
+===========+===============+===============+
| Circle    | :math:`\pi    | :math:`2 \pi  |
|           | r^2`          | r`            |
+-----------+---------------+---------------+
| Square    | :math:`w^2`   | :math:`4w`    |
+-----------+---------------+---------------+

However, sphinx-lint rejects it with the following error message:

$ sphinx-lint test.rst
test.rst:7: role missing (escaped) space after role: ':math:`\\pi    | :math:`2' (missing-space-after-role)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions