lkml.org 
[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
From
Date

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


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