Hello, This tiny patch fixes a wrong regex in the gawk script 'build-aux/pmccabe2html'. The commands replace '&' with '&', '>' with '>' and '<' with '<', but I think the actual replacement doesn't work properly.
A contrived example:
$ echo '=>=' | gawk '{gsub(">","\>",$0);print}'
gawk: cmd. line:1: warning: escape sequence `\&' treated as plain `&'
=>gt;=
The '\&' is treated as '&', and thus has special meaning for gsub (the matched
string).
The output therefor contains the matched '>' instead of an actual '&'.
With an extra backslash:
$ echo '=>=' | gawk '{gsub(">","\\>",$0);print}'
=>=
Another example: the recently updated cyclomatic report for gnu libidn at:
https://www.gnu.org/software/libidn/cyclo/
contains similarly incorrect HTML tags.
can be seen if one clicks on the down-arrow next to "_g_utf8_normalize_wc"
with lines such as:
===
while ((max_len gt;= SBase && wc gt;= SBase && wc gt; 0)
===
regards,
- assaf
pmccabe.patch
Description: Binary data
