summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 917a92b7ef..35a94c9e89 100644
--- a/parse.y
+++ b/parse.y
@@ -2999,7 +2999,10 @@ tokadd_string(func, term, paren, nest)
}
switch (c) {
case '\n':
- continue;
+ if (func & STR_FUNC_QWORDS) break;
+ if (func & STR_FUNC_EXPAND) continue;
+ tokadd('\\');
+ break;
case '\\':
if (func & STR_FUNC_ESCAPE) tokadd(c);