sphinx-lint icon indicating copy to clipboard operation
sphinx-lint copied to clipboard

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

Open lpsinger opened this issue 1 year ago • 3 comments
trafficstars

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)

lpsinger avatar Sep 26 '24 07:09 lpsinger