# HG changeset patch # User Assaf Gordon # Date 1438493407 21600 # Node ID 77cfc81a8ea56a0b4079f0d5dae226ff3dea0284 # Parent 1a83dacc08693f7c521fd50a3cc9c1288a00ec6e 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 `&' diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-08-01 Assaf Gordon (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 time_rz: port to pedantic memcpy diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html --- a/build-aux/pmccabe2html +++ b/build-aux/pmccabe2html @@ -422,9 +422,9 @@ while ((getline codeline < (fname nfun "_fn.txt")) > 0) { - gsub(/&/, "\&", codeline) # Must come first. - gsub(//, "\>", codeline) + gsub(/&/, "\\&", codeline) # Must come first. + gsub(//, "\\>", codeline) print codeline }