Home
last modified time | relevance | path

Searched hist:af250290430e1e678eef8c5c646a1bfd6af7b68a (Results 1 – 1 of 1) sorted by relevance

/linux/scripts/
H A Dkernel-docdiff af250290430e1e678eef8c5c646a1bfd6af7b68a Tue Feb 06 23:58:45 CET 2018 Jonathan Corbet <corbet@lwn.net> docs: kernel-doc: Don't mangle literal code blocks in comments

It can be useful to put code snippets into kerneldoc comments; that can be
done with the "::" operator at the end of a line like this::

if (desperate)
run_in_circles();

The ".. code-block::" directive can also be used to this end. kernel-doc
currently fails to understand these literal blocks and applies its normal
markup to them, which is then treated as literal by sphinx. The result is
unsightly markup instead of a useful code snippet.

Apply a hack to the output code to recognize literal blocks and avoid
performing any special markup on them. It's ugly, but that means it fits
in well with the rest of the script.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>