fix: Blank line after a backslash continuation swallows the next key #21
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/multiline-continuation-blank-line"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A cont_sign ('\') is meant to fold only the single line right after it, but the lexer inferred "still folding" from whether the last emitted token was a cont_sign. Blank lines emit no token, so that check stayed true across any number of blank lines and even leaked into the next, unrelated keyword's parse (readKeyValuePair is re-entered once per keyword), silently merging it into the previous value.
Track fold state explicitly on the Lexer instead of inferring it from the token stream, so a continuation ends after exactly one folded line.
A cont_sign ('\') is meant to fold only the single line right after it, but the lexer inferred "still folding" from whether the last emitted token was a cont_sign. Blank lines emit no token, so that check stayed true across any number of blank lines and even leaked into the next, unrelated keyword's parse (readKeyValuePair is re-entered once per keyword), silently merging it into the previous value. Track fold state explicitly on the Lexer instead of inferring it from the token stream, so a continuation ends after exactly one folded line.