commit bd20dca4e12ce1cc1e509fa24985315ebb83b7de
parent d254a6ac173d1651efb7f0beb8e83d3e84a4d123
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 5 Jun 2021 14:26:36 +0200
README: fix escape sequence which is non-POSIX
The "\s" escape sequence is non-POSIX and GNU awk gives a warning:
gawk: cmd. line:69: warning: escape sequence `\s' treated as plain `s'
BSD awk does not give this warning and supports it.
Use the POSIX [[:space:]] character class instead.
References:
- https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
The table in the section "Regular Expressions".
- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tag_05
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README b/README
@@ -309,7 +309,7 @@ advertisements, strip tracking parameters and more.
$8 = filterlink($8); # enclosure
# try to remove tracking pixels: <img/> tags with 1px width or height.
- gsub("<img[^>]*(width|height)[\s]*=[\s]*[\"'"'"' ]?1[\"'"'"' ]?[^0-9>]+[^>]*>", "", $4);
+ gsub("<img[^>]*(width|height)[[:space:]]*=[[:space:]]*[\"'"'"' ]?1[\"'"'"' ]?[^0-9>]+[^>]*>", "", $4);
print $0;
}'