Commit 7c8b9e30 authored by Nícolas F. R. A. Prado's avatar Nícolas F. R. A. Prado Committed by Jonathan Corbet

kernel-doc: Update "cross-referencing from rST" section to use automarkup

Update text and examples in the "Cross-referencing from
reStructuredText" section to reflect that no additional syntax is needed
anymore.
Signed-off-by: default avatarNícolas F. R. A. Prado <nfraprado@protonmail.com>
Link: https://lore.kernel.org/r/20200903005747.3900333-3-nfraprado@protonmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent d82b1e83
...@@ -387,22 +387,23 @@ Domain`_ references. ...@@ -387,22 +387,23 @@ Domain`_ references.
Cross-referencing from reStructuredText Cross-referencing from reStructuredText
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To cross-reference the functions and types defined in the kernel-doc comments No additional syntax is needed to cross-reference the functions and types
from reStructuredText documents, please use the `Sphinx C Domain`_ defined in the kernel-doc comments from reStructuredText documents.
references. For example:: Just end function names with ``()`` and write ``struct``, ``union``, ``enum``
or ``typedef`` before types.
See function :c:func:`foo` and struct/union/enum/typedef :c:type:`bar`. For example::
While the type reference works with just the type name, without the See foo().
struct/union/enum/typedef part in front, you may want to use:: See struct foo.
See union bar.
See :c:type:`struct foo <foo>`. See enum baz.
See :c:type:`union bar <bar>`. See typedef meh.
See :c:type:`enum baz <baz>`.
See :c:type:`typedef meh <meh>`. However, if you want custom text in the cross-reference link, that can be done
through the following syntax::
This will produce prettier links, and is in line with how kernel-doc does the
cross-references. See :c:func:`my custom link text for function foo <foo>`.
See :c:type:`my custom link text for struct bar <bar>`.
For further details, please refer to the `Sphinx C Domain`_ documentation. For further details, please refer to the `Sphinx C Domain`_ documentation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment