From f0c1233d4f97b499dd51688b089ad7c485c14b2a Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 1 Dec 2020 10:48:03 +0000 Subject: Leave newlines inside multiline quotes. --- cmd-parse.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd-parse.y') 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 != '#') -- cgit v1.2.3