mandoc does not support any kind of macros within tables. See https://man.openbsd.org/mandoc.1#ignoring~5 . But Sphinx generates such tables. I suggest that it instead should omit all macros from tables in the man output, preserving them only in the HTML output.
How to Reproduce
index.rst:
================= =======
This is a table
================= =======
.. envvar:: foo banana
.. envvar:: blart mart
================= =======
Describe the bug
mandoc does not support any kind of macros within tables. See https://man.openbsd.org/mandoc.1#ignoring~5 . But Sphinx generates such tables. I suggest that it instead should omit all macros from tables in the man output, preserving them only in the HTML output.
How to Reproduce
index.rst:
conf.py:
And here's what mandoc has to say about it:
Environment Information
Sphinx extensions
No response
Additional context
No response