Fixes for parsing regex meta-rules.

This commit is contained in:
Daniel Jones 2014-02-01 18:19:26 -08:00
parent 0cc6493a56
commit b9a5986fc7
2 changed files with 23 additions and 8 deletions

View file

@ -78,7 +78,11 @@ func expand(input string, vars map[string][]string, expandBackticks bool) []stri
// Expand following a '\\'
func expandEscape(input string) (string, int) {
c, w := utf8.DecodeRuneInString(input)
return string(c), w
if c == '\t' || c == ' ' {
return string(c), w
} else {
return "\\" + string(c), w
}
}
// Expand a double quoted string starting after a '\"'