mirror of
https://github.com/curl/curl.git
synced 2026-07-07 08:17:14 +03:00
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:
parent
e694c8284a
commit
3eb57d6ba7
60 changed files with 273 additions and 241 deletions
14
.github/scripts/badwords.pl
vendored
14
.github/scripts/badwords.pl
vendored
|
|
@ -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) ||
|
||||
|
|
|
|||
5
.github/scripts/badwords.txt
vendored
5
.github/scripts/badwords.txt
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue