]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mdlinkcheck: do not pick up single quote and backslash after URLs
authorViktor Szakats <commit@vsz.me>
Tue, 9 Dec 2025 22:27:34 +0000 (23:27 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 9 Dec 2025 22:54:55 +0000 (23:54 +0100)
Closes #19910

scripts/mdlinkcheck

index f83144108e3976b0d28e5a1907eced0e84a562dc..446cb9f1dd6ed84518a2eab061745a71f52e0c7c 100755 (executable)
@@ -160,10 +160,10 @@ sub findlinks {
             #print "$f:$line $link\n";
             storelink($f, $line, $link);
         }
-        # 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) {
+        # ignore trailing: dot, double quote, single quote, asterisk, hash,
+        # comma, question mark, colon, closing parenthesis, backslash,
+        # closing angle bracket, whitespace, pipe, backtick, semicolon
+        elsif(/(https:\/\/[a-z0-9.\/:%_+@-]+[^."'*\#,?:\)> \t|`;\\])/i) {
             #print "RAW ";
             storelink($f, $line, $1);
         }