From: Daniel Stenberg Date: Thu, 27 Jun 2024 09:23:13 +0000 (+0200) Subject: verify-synopsis.pl: work with .md files X-Git-Tag: curl-8_9_0~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41e0250411acc418617dd7f80870f2cf6eaf2103;p=thirdparty%2Fcurl.git verify-synopsis.pl: work with .md files Ref: #14037 Closes #14038 --- diff --git a/.github/scripts/verify-synopsis.pl b/.github/scripts/verify-synopsis.pl index 9d32185035..aa26917946 100755 --- a/.github/scripts/verify-synopsis.pl +++ b/.github/scripts/verify-synopsis.pl @@ -46,17 +46,17 @@ sub extract { open(O, ">$cfile"); while() { $iline++; - if(/^.SH SYNOPSIS/) { + if(/^# SYNOPSIS/) { $syn = 1 } elsif($syn == 1) { - if(/^.nf/) { + if(/^\~\~\~/) { $syn++; print O "#line $iline \"$f\"\n"; } } elsif($syn == 2) { - if(/^.fi/) { + if(/^\~\~\~/) { last; } # turn the vararg argument into vararg @@ -68,13 +68,17 @@ sub extract { close(F); close(O); + if($syn < 2) { + print STDERR "Found no synopsis in $f\n"; + return 1; + } + return 0; } my $error; for my $m (@files) { - print "Verify $m\n"; - extract($m); + $error |= extract($m); $error |= testcompile($m); } exit $error;