lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/1] A compact idiom to add code examples in kerneldoc comments.
    On Thu, Mar 26, 2020 at 07:16:28PM +0000, peter@bikeshed.quignogs.org.uk wrote:
    > From: Peter Lister <peter@bikeshed.quignogs.org.uk>
    >
    > scripts/kernel-doc - When a double colon follows a section heading
    > (e.g. Example::), write a double colon line to the ReST output to make
    > the following text (e.g. a code snippet) into a literal block.

    I think this is a good idea

    > -
    > + # $doc_sect is a regex which searches for section names.
    > + # If it matches:
    > + # $1 is the section name
    > + # $2 is a colon if the section name was followed by a double colon.
    > + # $3 the rest of the content after the colon (or double colon).

    I would add an extra 'is' after $3.

    > if (/$doc_sect/i) { # case insensitive for supported section names
    > $newsection = $1;
    > - $newcontents = $2;
    > -
    > + # If $2 is ':', the section name was followed by a double
    > + # colon, so insert a containing just '::' to make the

    Missing word between 'a' and 'containing'?

    \
     
     \ /
      Last update: 2020-03-26 20:30    [W:2.392 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site