summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index daa0fe1f96..85cbc37331 100644
--- a/parse.y
+++ b/parse.y
@@ -6433,7 +6433,7 @@ parser_heredoc_identifier(struct parser_params *parser)
term = c;
while ((c = nextc()) != -1 && c != term) {
if (tokadd_mbchar(c) == -1) return 0;
- if (c == '\n') newline = 1;
+ if (!newline && c == '\n') newline = 1;
else if (newline) newline = 2;
}
if (c == -1) {