From: Daniel Stenberg Date: Mon, 8 Dec 2025 10:16:18 +0000 (+0100) Subject: mdlinkcheck: ignore IP numbers, allow '@' in raw URLs X-Git-Tag: rc-8_18_0-2~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1c01b2015cb0082ec9ad2235953e46690410309;p=thirdparty%2Fcurl.git mdlinkcheck: ignore IP numbers, allow '@' in raw URLs --- diff --git a/scripts/mdlinkcheck b/scripts/mdlinkcheck index 734617949d..dfeeac0f60 100755 --- a/scripts/mdlinkcheck +++ b/scripts/mdlinkcheck @@ -120,6 +120,9 @@ sub storelink { elsif($link =~ /^https:\/\/github.com\/curl\/curl(\/|$)/) { #print "-- curl github repo: $link\n"; } + elsif($link =~ /^(https|http):\/\/[0-9.]+(\/|$)/) { + #print "-- IPv4 number: $link\n"; + } else { #print "ADD '$link'\n"; $url{$link} .= "$f:$line "; @@ -160,7 +163,7 @@ sub findlinks { # ignore trailing: dot, quote, asterisk, hash, comma, question mark, # colon, closing parenthesis, closing angle bracket, whitespace, pipe, # backtick, semicolon - elsif(/(https:\/\/[a-z0-9.\/:%_-]+[^."*\#,?:\)> \t|`;])/i) { + elsif(/(https:\/\/[a-z0-9.\/:%_+@-]+[^."*\#,?:\)> \t|`;])/i) { #print "RAW "; storelink($f, $line, $1); }