8000 [Yaml] Fix wrong line number when comments are inserted in the middle of a block. by paradajozsef · Pull Request #17733 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Yaml] Fix wrong line number when comments are inserted in the middle of a block. #17733

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

Prev Previous commit
Next Next commit
[Yaml] Fix wrong line number when comments are inserted in the middle…
… of a block.
  • Loading branch information
paradajozsef committed May 6, 2016
commit 2a082b0927a396df9194915c95541562411917cd
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ private function getNextEmbedBlock($indentation = null, $inSequence = false)
}

// we ignore "comment" lines only when we are not inside a scalar block
if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) {
if (empty($blockScalarIndentations) && $this->isCurrentLineComment() && false === $this->isPreviousNonCommentLineIsCollectionItem()) {
continue;
}

Expand Down
0