docs: use lowercase curl and libcurl

Adjusted badwords to find them.

Plus: make badwords run on all markdown files in the repo and update
markdowns previously unchecked

Closes #15898
This commit is contained in:
Daniel Stenberg 2025-01-02 14:43:23 +01:00
parent e694c8284a
commit 3eb57d6ba7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
60 changed files with 273 additions and 241 deletions

View file

@ -8,13 +8,21 @@
# If separator is '=', the string will be compared case sensitively.
# If separator is ':', the check is done case insensitively.
#
# To add white listed uses of bad words that are removed before checking for
# the bad ones:
#
# ---(accepted word)
#
my $w;
while(<STDIN>) {
chomp;
if($_ =~ /^#/) {
next;
}
if($_ =~ /^([^:=]*)([:=])(.*)/) {
if($_ =~ /^---(.*)/) {
push @whitelist, $1;
}
elsif($_ =~ /^([^:=]*)([:=])(.*)/) {
my ($bad, $sep, $better)=($1, $2, $3);
push @w, $bad;
$alt{$bad} = $better;
@ -41,6 +49,10 @@ sub file {
$in =~ s/(\[.*\])\(.*\)/$1/g;
# remove backticked texts
$in =~ s/\`.*\`//g;
# remove whitelisted patterns
for my $p (@whitelist) {
$in =~ s/$p//g;
}
foreach my $w (@w) {
my $case = $exactcase{$w};
if(($in =~ /^(.*)$w/i && !$case) ||

View file

@ -66,3 +66,8 @@ couldn't:could not
64-bits:64 bits or 64-bit
32-bits:32 bits or 32-bit
\bvery\b:rephrase using an alternative word
\bCurl\b=curl
\bLibcurl\b=libcurl
---WWW::Curl
---NET::Curl
---Curl Corporation