You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.rsttest.rst:7: role missing (escaped) space after role: ':math:`\\pi | :math:`2' (missing-space-after-role)
The text was updated successfully, but these errors were encountered:
Currently Sphinx Lint can't work with tables, there's no understanding
of how linesplit works in tables, like:
+-----------------------------------------+-----------------------------+---------------+ | Method | Checks that | New in |+=========================================+=============================+===============+ |:meth:`assertEqual(a, b) | ``a == b`` || | <TestCase.assertEqual>` |||+-----------------------------------------+-----------------------------+---------------+
as Sphinx Lint works line by line it will inevitably think the :meth: role is not closed properly.
To avoid false positives, some rules are skipped if we're in a table.
It sounds like we need to skip this missing-space-after-role rule inside a table as well?
Would you like to investigate and maybe put together a PR?
The following is valid reStructuredText/Sphinx with line-wrapped math directives inside table cells:
However, sphinx-lint rejects it with the following error message:
The text was updated successfully, but these errors were encountered: