[Yaml] Align unquoted multiline scalar parsing with spec for comments#62409
Merged
nicolas-grekas merged 1 commit intosymfony:6.4from Nov 16, 2025
Merged
Conversation
xabbuh
reviewed
Nov 15, 2025
xabbuh
reviewed
Nov 15, 2025
xabbuh
reviewed
Nov 15, 2025
xabbuh
reviewed
Nov 15, 2025
| ]; | ||
|
|
||
| yield 'blank lines and comments' => [ | ||
| yield 'blank lines are preserved and comment stops scalar' => [ |
Member
There was a problem hiding this comment.
I think we should also have a test covering that an exception is thrown when the comment is not at the end.
Contributor
Author
There was a problem hiding this comment.
I've added a new dedicated test testUnquotedMultilineScalarThrowsOnOrphanedLineAfterComment
fb61e7d to
7911644
Compare
Member
|
Thank you @yoeunes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is a follow-up to #62359 based on feedback from @xabbuh regarding spec compliance.
My previous PR fixed a
ParseExceptionon blank lines, but it handled comments incorrectly (it ignored them inside the scalar).This PR aligns the parser with the YAML spec (3.2.3.3):