rebuild urls

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-27 23:38:45 +02:00
parent 0382b6b3bb
commit fc43a03547
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@
const domainRegex =
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/;
if (domainRegex.test(firstPart)) {
return firstPart;
return firstPart.replace("_", "-");
}
return null;
}

View File

@@ -12,7 +12,7 @@
const domainRegex =
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/;
if (domainRegex.test(firstPart)) {
return firstPart;
return firstPart.replace("_", "-");
}
return null;
}