[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <B13709B3-563E-4FC6-A8FE-D3A4F0E2E51B@darmarit.de>
Date: Wed, 14 Feb 2018 17:53:06 +0100
From: Markus Heiser <markus.heiser@...marit.de>
To: Jonathan Corbet <corbet@....net>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Tobin C. Harding" <me@...in.cc>,
Jani Nikula <jani.nikula@...ux.intel.com>
Subject: Re: [PATCH 8/8] docs: kernel-doc: Don't mangle literal code blocks in
comments
> Am 07.02.2018 um 18:26 schrieb Jonathan Corbet <corbet@....net>:
>
> 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();
>
> 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.
>
> Signed-off-by: Jonathan Corbet <corbet@....net>
[...]
FYI; added similar patch to python version of kernel-doc:
https://github.com/return42/linuxdoc/commit/3205b8a68
may you like to add regexpr for code-block directive to your patch (jani mentioned already).
-- Markus --
Powered by blists - more mailing lists