Skip to content

Commit ef179aa

Browse files
committed
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
1 parent effae6a commit ef179aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Yaml/Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ private function isCurrentLineCollectionItem()
787787
{
788788
$ltrimmedLine = ltrim($this->currentLine, ' ');
789789

790-
return '' !== $ltrimmedLine && $ltrimmedLine[0] === '-';
790+
return '' !== $ltrimmedLine && '-' === $ltrimmedLine[0];
791791
}
792792

793793
/**

0 commit comments

Comments
 (0)