docs: automarkup.py: Add cross-reference for parametrized C macros
authorNícolas F. R. A. Prado <nfraprado@protonmail.com>
Tue, 13 Oct 2020 23:13:34 +0000 (23:13 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 15 Oct 2020 05:49:38 +0000 (07:49 +0200)
commitc51d9b046f907b7c96760700c6bdda6fbe38de60
treeb3b4375e788e793e6d211d76ec13768ad55a2336
parent3050edfd7971da7fddc77ac7c4607697ec10a554
docs: automarkup.py: Add cross-reference for parametrized C macros

Sphinx 3 added support for declaring C macros with parameters using the
:c:macro role.

To support automarkup for both functions and parametrized macros using
the same regex (words ending in ()), try to cross-reference to both, and
only fall back to regular text if neither exist.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/sphinx/automarkup.py