Skip to content

Commit 4ae4105

Browse files
committed
revert to simpler email local-part regex
1 parent ecdfa0c commit 4ae4105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/matcherRegexSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Autolinker.matcherRegex = (function() {
2222
var twitterRegex = /(^|\s)@(\w{1,15})/, // For matching a twitter handle. Ex: @gregory_jacobs
2323

24-
emailRegex = /(?:[A-Za-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(\.[A-Za-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*@)/, // something@ for email addresses (a.k.a. local-part), taken from https://github.com/tolsen/email-validator/blob/9f571290d1a7c2d3db35b5da86b8a310f245f48f/lib/email_validator.rb#L35
24+
emailRegex = /(?:[\-;:&=\+\$,\w\.]+@)/, // something@ for email addresses (a.k.a. local-part)
2525

2626
protocolRegex = /(?:[A-Za-z]{3,9}:(?:\/\/)?)/, // match protocol, allow in format http:// or mailto:
2727
wwwRegex = /(?:www\.)/, // starting with 'www.'

0 commit comments

Comments
 (0)