Merge pull request #152 from Somasis/master

Fix special char escaping so `mawk` likes it

LTGM, thanks
This commit is contained in:
rupa committed 2015-04-14 10:35:48 -04:00
commit d5adc9a623
1 file changed
+1 -1
+1 -1
View File
@@ -163,7 +163,7 @@ _z() {
# use a copy to escape special characters, as we want to return
# the original. yeah, this escaping is awful.
clean_short = short
gsub(/[\(\)\[\]\|]/, "\\\\&", clean_short)
gsub(/\[\(\)\[\]\|\]/, "\\\\&", clean_short)
for( x in matches ) if( matches[x] && x !~ clean_short ) return
return short
}