]> git.baikalelectronics.ru Git - kernel.git/commit
docs: Add automatic cross-reference for C types
authorNícolas F. R. A. Prado <nfraprado@protonmail.com>
Thu, 3 Sep 2020 00:58:19 +0000 (00:58 +0000)
committerJonathan Corbet <corbet@lwn.net>
Thu, 3 Sep 2020 19:50:40 +0000 (13:50 -0600)
commit24c4a5ff342d5ecf8692027f93f1611a5a72223a
tree4ddcddd78090933be57ee5ed6636b6be70f68e8c
parent11141df7e3e23a812795bfcd9523af564b7e4038
docs: Add automatic cross-reference for C types

In order to cross-reference C types in the documentation, Sphinx
requires the syntax :c:type:`type_name`, or even :c:type:`struct
type_name <type_name>` in order to have the link text different from the
target text.

Extend automarkup to enable automatic cross-reference of C types by
matching any "struct|union|enum|typedef type_name" expression.
This makes the documentation's plain text cleaner and adds
cross-reference to types without any additional effort by the author.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
Link: https://lore.kernel.org/r/20200903005747.3900333-2-nfraprado@protonmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/automarkup.py