Skip to content
Snippets Groups Projects
Commit 03033dfa authored by Philipp Hörist's avatar Philipp Hörist
Browse files

fix: Styling: Improve address regex

Allow "-" in domain part
parent be62995e
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@
UNQUOTE_RX = re.compile(r'^> |^>', re.M)
URI_RX = r'(?P<uri>([\w-]+://|www[.])[\S()<>]+?(?=[,>]?(\s|\Z)+))'
ADDRESS_RX = r'(?P<address>\b((xmpp|mailto):)?[\w-]*@(\w*?\.)+[\w]+([\?].*?(?=([\s\),]|$)))?)' # noqa: E501
ADDRESS_RX = r'(?P<address>\b((xmpp|mailto):)?[\w-]*@([\w-]*?\.)+[\w]+([\?].*?(?=([\s\),]|$)))?)' # noqa: E501
URI_ADDRESS_RX = URI_RX + '|' + ADDRESS_RX
URI_RX = re.compile(URI_RX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment