[lkml]   [2018]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 8/8] docs: kernel-doc: Don't mangle literal code blocks in comments

> Am 07.02.2018 um 18:26 schrieb Jonathan Corbet <>:
> 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 <>


FYI; added similar patch to python version of kernel-doc:

may you like to add regexpr for code-block directive to your patch (jani mentioned already).

-- Markus --

 \ /
  Last update: 2018-02-14 17:53    [W:0.201 / U:3.308 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site