Skip to content

Commit e6b4ab2

Browse files
committed
add .me and .io to list of TLDs
also alphabetize the list to make it easier to read
1 parent 4ae4105 commit e6b4ab2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Autolinker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ var Autolinker = {
164164
return resultHtml;
165165
}
166166

167-
};
167+
};

src/matcherRegexSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Autolinker.matcherRegex = (function() {
2626
protocolRegex = /(?:[A-Za-z]{3,9}:(?:\/\/)?)/, // match protocol, allow in format http:// or mailto:
2727
wwwRegex = /(?:www\.)/, // starting with 'www.'
2828
domainNameRegex = /[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/, // anything looking at all like a domain, non-unicode domains, not ending in a period
29-
tldRegex = /\.(?:com|org|net|gov|edu|mil|us|info|biz|ws|name|mobi|cc|tv|co\.uk|de|ru|hu|fr|br)/, // match our known top level domains (TLDs)
29+
tldRegex = /\.(?:biz|br|cc|co\.uk|com|de|edu|fr|gov|hu|info|io|me|mil|mobi|name|net|org|ru|tv|us|ws)/, // match our known top level domains (TLDs)
3030

3131
pathRegex = /(?:\/(?:[\+~%\/\.\w\-]*[\+~%\/\w\-])?)?/, // allow optional /path
3232
queryStringRegex = /(?:\?[\-\+=&;%@\.\w]*)?/, // allow optional query string starting with ?

0 commit comments

Comments
 (0)