Skip to content

[Yaml] fix multiline block handling #22853

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

Merged
merged 1 commit into from
May 24, 2017
Merged

[Yaml] fix multiline block handling #22853

merged 1 commit into from
May 24, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented May 22, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21114, #22105 (comment)
License MIT
Doc PR

@@ -368,7 +368,11 @@ private function doParse($value, $flags)

foreach ($this->lines as $line) {
try {
$parsedLine = Inline::parse($line, $flags, $this->refs);
if (isset($line[0]) && in_array($line[0], array('"', "'"), true)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shorter and easier to read imho:
if (isset($line[0]) && ('"' === $line[0] || "'" === $line[0])) {

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 with minor comment

@fabpot
Copy link
Member

fabpot commented May 24, 2017

Thank you @xabbuh.

@fabpot fabpot merged commit a2079d6 into symfony:3.3 May 24, 2017
fabpot added a commit that referenced this pull request May 24, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] fix multiline block handling

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21114, #22105 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

a2079d6 [Yaml] fix multiline block handling
@xabbuh xabbuh deleted the pr-21114 branch May 24, 2017 06:32
@fabpot fabpot mentioned this pull request May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants