Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8531f82

Browse files
committed
[Yaml] Fix sequence with following mapping
1 parentecf9859 commit8531f82

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

‎src/Symfony/Component/Yaml/Parser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ private function lexInlineSequence(string $yaml): string
12421242
$value =$yaml;
12431243

12441244
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) {
12461246
}
12471247

12481248
$trimmedValue =trim($this->currentLine);

‎src/Symfony/Component/Yaml/Tests/ParserTest.php‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,22 @@ public function inlineNotationSpanningMultipleLinesProvider(): array
16991699
YAML
17001700
,
17011701
],
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+
],
17021718
'nested sequence nested in mapping starting on the same line' => [
17031719
[
17041720
'foo' => [

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp