Remove double slashes from URLs before matching.

This commit is contained in:
2024-09-11 05:16:55 +02:00
parent a56a5c9a10
commit 20a9c01444

View File

@@ -62,7 +62,7 @@ module.exports = function dissectLink(url) {
return acc;
}
const match = host.pattern.match(url);
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
if(match) {
return Object.assign(match, {