summaryrefslogtreecommitdiffstats
path: root/cmd-parse.y
diff options
context:
space:
mode:
authornicm <nicm>2020-12-01 10:48:03 +0000
committernicm <nicm>2020-12-01 10:48:03 +0000
commitf0c1233d4f97b499dd51688b089ad7c485c14b2a (patch)
treed1c4720b86f950bc231311b3fe8e0e1e386faa9c /cmd-parse.y
parent9a74bba007a60b93d1fdf68772e5cfb61b3558ff (diff)
Leave newlines inside multiline quotes.
Diffstat (limited to 'cmd-parse.y')
-rw-r--r--cmd-parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-parse.y b/cmd-parse.y
index c8995d8b..7b42c621 100644
--- a/cmd-parse.y
+++ b/cmd-parse.y
@@ -1505,8 +1505,12 @@ yylex_token(int ch)
state == NONE)
break;
- /* Spaces and comments inside quotes after \n are removed. */
+ /*
+ * Spaces and comments inside quotes after \n are removed but
+ * the \n is left.
+ */
if (ch == '\n' && state != NONE) {
+ yylex_append1(&buf, &len, '\n');
while ((ch = yylex_getc()) == ' ' || ch == '\t')
/* nothing */;
if (ch != '#')