aerc/filters
Robin Jarry 9d71da175a colorize: make it compatible with BSD awk
Fix the following error seen on MacOS:

/usr/bin/awk: syntax error at source line 22 source file
                header_pattern = >>>  @ <<< /^[A-Z][[:alnum:]-]+:/

The @ character in front of regular expressions to pre-compile them
seems not in the POSIX specification. Replace them with regular strings
and call match() instead of the ~ operator.

Also, adjust the url_pattern expression for BSD awk which explicitly
states:

 The awk utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”)
 specification, except awk does not support {n,m} pattern matching.

Use [[:lower:]]+ instead of [a-z]{2,6}.

Tested with:

  GNU Awk 5.1.1
  awk version 20121220 (FreeBSD)

Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
Fixes: https://todo.sr.ht/~rjarry/aerc/96
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
2022-10-23 20:51:02 +02:00
..
calendar filters: fix calendar filter parsing 2022-08-22 09:30:37 +02:00
colorize colorize: make it compatible with BSD awk 2022-10-23 20:51:02 +02:00
hldiff filters: Add missing shebangs 2022-07-11 15:53:23 +02:00
html filters: make it explicit that encoding is UTF-8 2022-08-03 22:36:51 +02:00
html-unsafe filters: make it explicit that encoding is UTF-8 2022-08-03 22:36:51 +02:00
plaintext filters: try and make awk scripts posix compliant 2022-07-18 13:58:21 +02:00
show-ics-details.py show-ics-details.py: fix error with python < 3.9 2022-03-24 15:30:42 +01:00