File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2671,6 +2671,29 @@ public function testParseValueWithNegativeModifiers()
26712671 );
26722672 }
26732673
2674+ public function testMultipleWhitespaceAtEndOfLine ()
2675+ {
2676+ $ yaml = "\nfoo: \n arguments: [ '@bar' ] \n" ;
2677+ $ this ->assertSame (
2678+ [
2679+ 'foo ' => [
2680+ 'arguments ' => ['@bar ' ],
2681+ ],
2682+ ],
2683+ $ this ->parser ->parse ($ yaml )
2684+ );
2685+
2686+ $ yaml = "\nfoo: \n bar: {} \n" ;
2687+ $ this ->assertSame (
2688+ [
2689+ 'foo ' => [
2690+ 'bar ' => [],
2691+ ],
2692+ ],
2693+ $ this ->parser ->parse ($ yaml )
2694+ );
2695+ }
2696+
26742697 /**
26752698 * This is a regression test for a bug where a YAML block with a nested multiline string using | was parsed without
26762699 * a trailing \n when a shorter YAML document was parsed before.
You can’t perform that action at this time.
0 commit comments