mdlinkcheck: do not pick up single quote and backslash after URLs

Closes #19910
This commit is contained in:
Viktor Szakats 2025-12-09 23:27:34 +01:00
parent 920319855d
commit 3fb932d492
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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);
}