Re: [PATCH v2 1/1] A compact idiom to add code examples in kerneldoc comments.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 26, 2020 at 07:16:28PM +0000, peter@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
> From: Peter Lister <peter@xxxxxxxxxxxxxxxxxxxxxxxx>
> 
> 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'?




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux