aboutsummaryrefslogtreecommitdiff
path: root/filters
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-23 22:34:41 +0100
committerRobin Jarry <robin@jarry.cc>2022-03-03 21:38:02 +0100
commitd2c239292e2270b949faa67c8f91e99e2a59cc88 (patch)
tree1fc22d73c64f155345129099eb9400718dd33e8b /filters
parentc77a1c5d9d635c7ddf515f732699f4346445d058 (diff)
downloadaerc-d2c239292e2270b949faa67c8f91e99e2a59cc88.tar.gz
aerc-d2c239292e2270b949faa67c8f91e99e2a59cc88.zip
filters: fix colorize urls in signatures
When a signature contains a line that starts with an url, the url is not highlighted properly: -- Foobar [38;2;255;255;175mmhttps://foobar.org The trailing m of the signature color start \x1b[38;2;175;135;255m is considered as part of the URL scheme (i.e. mhttps:// instead of https://). Colorize the URLs first before wrapping with the signature color. Fixes: df8c129235d9 ("filters: port colorize to awk") Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/colorize2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/colorize b/filters/colorize
index 2e6001c0..c0e25f1b 100755
--- a/filters/colorize
+++ b/filters/colorize
@@ -77,8 +77,8 @@ function color_quote(line) {
$0 = diff_del $0 reset
}
} else if (in_signature) {
- $0 = signature $0 reset
gsub(url_pattern, url "&" signature)
+ $0 = signature $0 reset
} else if (in_headers) {
if ($0 ~ /^$/) {
in_signature = 0