]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mdlinkcheck: ignore IP numbers, allow '@' in raw URLs
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Dec 2025 10:16:18 +0000 (11:16 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Dec 2025 11:57:51 +0000 (12:57 +0100)
scripts/mdlinkcheck

index 734617949d2d92fcf1278fc08328ddf2bd87cc16..dfeeac0f60e6cc44b9cb76fcf2089dee9b528041 100755 (executable)
@@ -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);
         }