Update lex_attrs.py. Fix like_url from matching on e-mail

This commit is contained in:
Bri-Will 2017-12-11 14:13:28 -08:00 committed by GitHub
parent 08e2c77368
commit d77361d76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,8 @@ def like_url(text):
return True
if text[0] == '.' or text[-1] == '.':
return False
if '@' in text: #prevent matches on e-mail addresses
return False
for i in range(len(text)):
if text[i] == '.':
break