diff options
author | Robin Jarry <robin@jarry.cc> | 2022-03-18 21:30:50 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-03-18 23:41:56 +0100 |
commit | 807870ea3542f2fcb00e7e0451af37c224041dfe (patch) | |
tree | a3536250f2440541ce7e6e9a73dace43c4e87dbb | |
parent | 40d298b8d85b30df051682545f42fe7031bd136c (diff) | |
download | aerc-807870ea3542f2fcb00e7e0451af37c224041dfe.tar.gz |
colorize: handle mailto prefixes in urls
mailto:email@domain.tld is the only exception that does not use the
<scheme>:// prefix.
Requested-by: Moritz Poldrack <moritz@poldrack.dev>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
-rwxr-xr-x | filters/colorize | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/colorize b/filters/colorize index c0e25f1b..e5502f25 100755 --- a/filters/colorize +++ b/filters/colorize @@ -23,7 +23,7 @@ BEGIN { in_body = 0 # patterns header_pattern = @/^[A-Z][[:alnum:]-]+:/ - url_pattern = @/[a-z]{2,6}:\/\/[[:graph:]]+|[[:alnum:]_\+\.~\/-]*[[:alnum:]_]@[[:lower:]][[:alnum:]\.-]*[[:lower:]]/ + url_pattern = @/[a-z]{2,6}:\/\/[[:graph:]]+|(mailto:)?[[:alnum:]_\+\.~\/-]*[[:alnum:]_]@[[:lower:]][[:alnum:]\.-]*[[:lower:]]/ } function color_quote(line) { level = 0 |