-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] chomp newlines only at the end of YAML documents #18828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
xabbuh
commented
May 21, 2016
Q | A |
---|---|
Branch? | 2.3 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #18784 |
License | MIT |
Doc PR |
It does fix the issue 👍 |
@@ -634,6 +643,11 @@ private function isCurrentLineComment() | ||
return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; | ||
} | ||
|
||
private function isCurrentLineLastLineInDocument() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's "nitpick" a bit: would isLastDocumentLine()
be a better name for isCurrentLineLastLineInDocument()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, we don't pass any argument so it's not really clear to what the method name refers to imo. Note that the isCurrentLine
prefix is a common pattern in the parser (e.g. isCurrentLineComment()
, isCurrentLineBlank()
and so on).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK then.
👍 Status: reviewed |
Thank you @xabbuh. |
…abbuh) This PR was merged into the 2.3 branch. Discussion ---------- [Yaml] chomp newlines only at the end of YAML documents | Q | A | ------------- | --- | Branch? | 2.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18784 | License | MIT | Doc PR | Commits ------- a4b1fa6 chomp newlines only at the end of YAML documents