~emersion/mrsh

e219bef8eae98846d8f89ead54b6847b876f1f97 — Simon Ser 6 months ago 9fabcfe
parser: consume final newline in expect_here_document

Fixes the last part of [1].

[1]: https://lists.sr.ht/~emersion/mrsh-dev/%3CC10JME71VSUQ.2ZCBK3RDD2XXW%40homura%3E
1 files changed, 3 insertions(+), 0 deletions(-)

M parser/program.c
M parser/program.c => parser/program.c +3 -0
@@ 1200,6 1200,9 @@ static bool expect_here_document(struct mrsh_parser *parser,
		}

		if (strcmp(line, delim) == 0) {
			if (parser_peek_char(parser) == '\n') {
				parser_read_char(parser);
			}
			break;
		}
		if (parser_peek_char(parser) == '\0') {