diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-06-05 14:26:36 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-06-05 14:31:40 +0200 |
commit | bd20dca4e12ce1cc1e509fa24985315ebb83b7de (patch) | |
tree | 1c14d4e54de93a051268c2499394eb424a52a605 /README | |
parent | d254a6ac173d1651efb7f0beb8e83d3e84a4d123 (diff) |
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 (limited to 'README')
-rw-r--r-- | README | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; }' |