File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/Symfony/Component/Yaml Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1242,7 +1242,7 @@ private function lexInlineSequence(string $yaml): string
1242
1242
$ value = $ yaml ;
1243
1243
1244
1244
while ($ this ->moveToNextLine ()) {
1245
- for ($ i = 1 ; isset ($ this ->currentLine [$ i ]) && '] ' !== $ this ->currentLine [$ i ]; ++$ i ) {
1245
+ for ($ i = 0 ; isset ($ this ->currentLine [$ i ]) && '] ' !== $ this ->currentLine [$ i ]; ++$ i ) {
1246
1246
}
1247
1247
1248
1248
$ trimmedValue = trim ($ this ->currentLine );
Original file line number Diff line number Diff line change @@ -1699,6 +1699,22 @@ public function inlineNotationSpanningMultipleLinesProvider(): array
1699
1699
YAML
1700
1700
,
1701
1701
],
1702
+ 'sequence spanning multiple lines nested in mapping with a following mapping ' => [
1703
+ [
1704
+ 'foobar ' => [
1705
+ 'foo ' ,
1706
+ 'bar ' ,
1707
+ ],
1708
+ 'bar ' => 'baz ' ,
1709
+ ],
1710
+ <<<YAML
1711
+ foobar: [
1712
+ foo,
1713
+ bar,
1714
+ ]
1715
+ bar: baz
1716
+ YAML
1717
+ ],
1702
1718
'nested sequence nested in mapping starting on the same line ' => [
1703
1719
[
1704
1720
'foo ' => [
You can’t perform that action at this time.
0 commit comments