diff options
author | Robin Jarry <robin@jarry.cc> | 2023-04-14 17:43:15 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-22 23:44:33 +0200 |
commit | 44b6c52ac342b1bc75ca565c3787e0b963259476 (patch) | |
tree | 6882a782510bacbd72af38fdd7f2f3f75d3181be | |
parent | c7f5f2cf4c2a043ce36ec486fe0d9203020c8744 (diff) | |
download | aerc-44b6c52ac342b1bc75ca565c3787e0b963259476.tar.gz |
colorize: support email domains that start/end with digits
According to RFC 1123:
"... a host domain name is now allowed to begin with a digit and could
legally be entirely numeric ..."
Link: https://datatracker.ietf.org/doc/html/rfc1123#section-2
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
-rw-r--r-- | filters/colorize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/colorize.c b/filters/colorize.c index 51bcdbe9..5122b241 100644 --- a/filters/colorize.c +++ b/filters/colorize.c @@ -457,7 +457,7 @@ static inline bool isurichar(char c) #define URL_RE \ "([a-z]{2,8})://" \ - "|(mailto:)?[[:alnum:]_+.~/-]*[[:alnum:]]@[a-z][[:alnum:].-]*[a-z]" + "|(mailto:)?[[:alnum:]_+.~/-]*[[:alnum:]]@[[:alnum:]][[:alnum:].-]*[[:alnum:]]" static regex_t url_re; static void urls(const char *in, struct style *ctx) |