mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Changbin Du <changbin.du@intel.com>,
	linux-kernel@vger.kernel.org,
	Markus Heiser <markus.heiser@darmarit.de>
Subject: Re: [PATCH] scripts: kernel-doc: allow passing desired Sphinx C domain dialect
Date: Tue, 06 Oct 2020 00:34:39 -0700	[thread overview]
Message-ID: <1396a58e7155f13b9c24daffabafa29d8d9106a5.camel@perches.com> (raw)
In-Reply-To: <20201006084207.125c88d5@coco.lan>

On Tue, 2020-10-06 at 08:42 +0200, Mauro Carvalho Chehab wrote:
> Em Mon, 5 Oct 2020 10:17:36 -0600
> Jonathan Corbet <corbet@lwn.net> escreveu:
[]
> Sure. It should be easy to make the third argument optional, although
> the regex will be a little more harder to understand.
> 
> Something like this should do the trick:
> 
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
[]
> @@ -466,12 +466,16 @@ while ($ARGV[0] =~ m/^--?(.*)/) {
>  	$show_not_found = 1;  # A no-op but don't fail
>      } elsif ($cmd eq "sphinx-version") {
>  	my $ver_string = shift @ARGV;
> -	if ($ver_string =~ m/^(\d+)\.(\d+)\.(\d+)/) {
> +	if ($ver_string =~ m/^(\d+)\.(\d+)(?:\.?(\d+)?)/) {

trivia: perhaps more readable as

	if ($ver_string =~ m/^(\d+)\.(\d+)(\.\d+)?/) {
	    $sphinx_major = $1;
	    $sphinx_minor = $2;
	    if (defined($3)) {
		$sphinx_patch = substr($3,1);
	    } else {
		$sphinx_patch = 0;
	    }



  reply	other threads:[~2020-10-06  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-04  8:02 Mauro Carvalho Chehab
2020-10-05 16:17 ` Jonathan Corbet
2020-10-06  6:42   ` Mauro Carvalho Chehab
2020-10-06  7:34     ` Joe Perches [this message]
2020-10-06 14:01     ` Jonathan Corbet
2020-10-06 16:53       ` Joe Perches
2020-10-12 12:27       ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396a58e7155f13b9c24daffabafa29d8d9106a5.camel@perches.com \
    --to=joe@perches.com \
    --cc=changbin.du@intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.heiser@darmarit.de \
    --cc=mchehab+huawei@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®