Skip to content

Stop comments from starting multiline values - #615

Merged
GrahamCampbell merged 1 commit into
masterfrom
fix/comment-multiline-priority
Aug 24, 2026
Merged

GrahamCampbell merged 1 commit into
masterfrom
fix/comment-multiline-priority

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

Comment recognition happens only after multiline detection, and the multiline heuristic searches the whole physical line for a quote start, so a comment containing the characters =" opened a phantom multiline buffer: every following line was silently swallowed until a stray closing quote arrived or the buffer was discarded at end of file, making unrelated later assignments vanish without an error, including for realistic inputs like a URL value followed by a comment mentioning a quoted example. The multiline start is now ignored when a hash appears earlier in the line than the quote start, so comments can no longer open multiline values, while genuine multiline values, including ones whose opening line contains a hash inside the quotes, are unchanged. The only behaviour change on previously accepted input is that a stray quote line following such a comment now fails name validation loudly instead of being silently dropped with its neighbours. This is stacked on #608.

@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from 21cd0f5 to 0945774 Compare August 24, 2026 17:28
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 28b36d6 to 3437eeb Compare August 24, 2026 17:28
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from 0945774 to 86ddd73 Compare August 24, 2026 17:43
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 3437eeb to 1411d10 Compare August 24, 2026 17:43
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from 86ddd73 to 415b11c Compare August 24, 2026 17:46
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 1411d10 to 445763b Compare August 24, 2026 17:46
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from 415b11c to ea4b204 Compare August 24, 2026 17:47
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 445763b to 2e18096 Compare August 24, 2026 17:47
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from ea4b204 to d135fe5 Compare August 24, 2026 17:49
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 2e18096 to fe56ffc Compare August 24, 2026 17:49
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from d135fe5 to c34c7b1 Compare August 24, 2026 17:56
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from fe56ffc to 7a62b85 Compare August 24, 2026 17:56
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from c34c7b1 to 4bf5e0d Compare August 24, 2026 17:57
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 7a62b85 to a2d162e Compare August 24, 2026 17:57
@GrahamCampbell
GrahamCampbell force-pushed the tests/coverage-hardening branch from 4bf5e0d to 7da2cde Compare August 24, 2026 18:03
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from a2d162e to 9fbee84 Compare August 24, 2026 18:03
Base automatically changed from tests/coverage-hardening to master August 24, 2026 18:03
@GrahamCampbell
GrahamCampbell force-pushed the fix/comment-multiline-priority branch from 9fbee84 to 527062b Compare August 24, 2026 18:04
@GrahamCampbell
GrahamCampbell merged commit 4426075 into master Aug 24, 2026
44 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix/comment-multiline-priority branch August 24, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant