summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.y15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/parse.y b/src/parse.y
index 9b2ddf9ed..506e6e279 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3486,17 +3486,9 @@ read_escape(parser_state *p)
return c;
case 'b': /* backspace */
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- return 'b';
- }
return '\010';
case 's': /* space */
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- return 's';
- }
return ' ';
case 'M':
@@ -3534,9 +3526,6 @@ read_escape(parser_state *p)
return '\0';
default:
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- }
return c;
}
}
@@ -3610,6 +3599,10 @@ parse_string(parser_state *p)
}
else {
pushback(p, c);
+
+ if(type & STR_FUNC_REGEXP)
+ tokadd(p, '\\');
+
tokadd(p, read_escape(p));
if (hinf)
hinf->line_head = FALSE;