diff options
author | Assaf Gordon <assafgordon@gmail.com> | 2015-08-01 23:30:07 -0600 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-08-01 23:41:44 -0700 |
commit | c496809ef2cff76c4209ee20171016cfa62694a5 (patch) | |
tree | dfa80d0f6df3ff46412f9e9e01ff67aea546fb54 | |
parent | cc47643cb9c3e755ce0e8b8f0060de6810d18166 (diff) | |
download | gnulib-c496809ef2cff76c4209ee20171016cfa62694a5.tar.gz |
pmccabe2html: fix gawk regex escaping
* build-aux/pmccabe2html: Add one more backslash to properly
escape the gsub replacement value. Fixes this error:
gawk: ./build-aux/pmccabe2html:425: \
warning: escape sequence `\&' treated as plain `&'
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | build-aux/pmccabe2html | 6 |
2 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2015-08-01 Assaf Gordon <assafgordon@gmail.com> (tiny change) + + pmccabe2html: fix gawk regex escaping + * build-aux/pmccabe2html: Add one more backslash to properly + escape the gsub replacement value. Fixes this error: + gawk: ./build-aux/pmccabe2html:425: \ + warning: escape sequence `\&' treated as plain `&' + 2015-07-29 Paul Eggert <eggert@cs.ucla.edu> time_rz: port to pedantic memcpy diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html index 18984321f8..ef54eccba5 100644 --- a/build-aux/pmccabe2html +++ b/build-aux/pmccabe2html @@ -422,9 +422,9 @@ function html_fnc (nfun, while ((getline codeline < (fname nfun "_fn.txt")) > 0) { - gsub(/&/, "\&", codeline) # Must come first. - gsub(/</, "\<", codeline) - gsub(/>/, "\>", codeline) + gsub(/&/, "\\&", codeline) # Must come first. + gsub(/</, "\\<", codeline) + gsub(/>/, "\\>", codeline) print codeline } |