Fix YAML parser to not treat document markers as special inside quoted strings #22397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #22392
Summary
Per @dylan-conway's guidance on issue #22392, this PR removes the document marker checks ( and ) from and in .
The Fix
Document markers should only be recognized at the start of a line in the main document flow, not within quoted strings where they should be treated as literal text. This PR:
Testing
The fix ensures that strings like and are parsed as literal text rather than triggering document marker errors.
Note
There's a separate pre-existing issue where multiline quoted strings don't parse correctly in Bun's YAML implementation (they fail with "Expected character"), but that's beyond the scope of this fix and would require additional work on the YAML parser.