From: Dr. David von Oheimb Date: Wed, 19 May 2021 07:38:20 +0000 (+0200) Subject: util/find-doc-nits: Improve helpstr pattern matching X-Git-Tag: openssl-3.0.0-beta1~466 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14d3bb06c9c11b3e13c64611913757c27bc057f2;p=thirdparty%2Fopenssl.git util/find-doc-nits: Improve helpstr pattern matching Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15299) --- diff --git a/util/find-doc-nits b/util/find-doc-nits index 7d68f70c029..c62307a9ce2 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -1069,11 +1069,11 @@ sub checkflags { err("$cmd does not implement help for -$expect_helpstr") unless m/^\s*"/; $expect_helpstr = ""; } - if (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)\s*,(.*)$/ - && !($cmd eq "s_client" && $1 eq "wdebug")) { + if (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)(.*)$/ + && !($cmd eq "s_client" && $1 eq "wdebug")) { push @cmdopts, $1; $expect_helpstr = $1; - $expect_helpstr = "" if $3 =~ m/^\s*"/; + $expect_helpstr = "" if $3 =~ m/^\s*,\s*"/; } elsif (m/[\s,](OPT_[A-Z]+_OPTIONS?)\s*(,|$)/) { push @cmdopts, @{ $genopts{$1} }; }