Merge remote-tracking branch 'origin/master' into iots_to_zod
This commit is contained in:
commit
59c5176cbd
39 changed files with 1420 additions and 2208 deletions
|
@ -522,7 +522,13 @@ export function getUrlsInString(str: string, onlyUnique = false): MatchedURL[] {
|
|||
return urls;
|
||||
}
|
||||
|
||||
const hostnameParts = matchUrl.hostname.split(".");
|
||||
let hostname = matchUrl.hostname.toLowerCase();
|
||||
|
||||
if (hostname.length > 3) {
|
||||
hostname = hostname.replace(/[^a-z]+$/, "");
|
||||
}
|
||||
|
||||
const hostnameParts = hostname.split(".");
|
||||
const tld = hostnameParts[hostnameParts.length - 1];
|
||||
if (tlds.includes(tld)) {
|
||||
urls.push(matchUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue