Server IP : 66.29.132.122 / Your IP : 3.129.25.104 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/opt/alt/php53/usr/share/pear/test/Yaml/Symfony/Component/Yaml/Tests/Fixtures/ |
Upload File : |
--- %YAML:1.0 test: Single ending newline brief: > A pipe character, followed by an indented block of text is treated as a literal block, in which newlines are preserved throughout the block, including the final newline. yaml: | --- this: | Foo Bar php: | array('this' => "Foo\nBar\n") --- test: The '+' indicator brief: > The '+' indicator says to keep newlines at the end of text blocks. yaml: | normal: | extra new lines not kept preserving: |+ extra new lines are kept dummy: value php: | array( 'normal' => "extra new lines not kept\n", 'preserving' => "extra new lines are kept\n\n\n", 'dummy' => 'value' ) --- test: Three trailing newlines in literals brief: > To give you more control over how space is preserved in text blocks, YAML has the keep '+' and chomp '-' indicators. The keep indicator will preserve all ending newlines, while the chomp indicator will strip all ending newlines. yaml: | clipped: | This has one newline. same as "clipped" above: "This has one newline.\n" stripped: |- This has no newline. same as "stripped" above: "This has no newline." kept: |+ This has four newlines. same as "kept" above: "This has four newlines.\n\n\n\n" php: | array( 'clipped' => "This has one newline.\n", 'same as "clipped" above' => "This has one newline.\n", 'stripped' => 'This has no newline.', 'same as "stripped" above' => 'This has no newline.', 'kept' => "This has four newlines.\n\n\n\n", 'same as "kept" above' => "This has four newlines.\n\n\n\n" ) --- test: Extra trailing newlines with spaces todo: true brief: > Normally, only a single newline is kept from the end of a literal block, unless the keep '+' character is used in combination with the pipe. The following example will preserve all ending whitespace since the last line of both literal blocks contains spaces which extend past the indentation level. yaml: | --- this: | Foo kept: |+ Foo php: | array('this' => "Foo\n\n \n", 'kept' => "Foo\n\n \n" ) --- test: Folded Block in a Sequence brief: > A greater-then character, followed by an indented block of text is treated as a folded block, in which lines of text separated by a single newline are concatenated as a single line. yaml: | --- - apple - banana - > can't you see the beauty of yaml? hmm - dog php: | array( 'apple', 'banana', "can't you see the beauty of yaml? hmm\n", 'dog' ) --- test: Folded Block as a Mapping Value brief: > Both literal and folded blocks can be used in collections, as values in a sequence or a mapping. yaml: | --- quote: > Mark McGwire's year was crippled by a knee injury. source: espn php: | array( 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", 'source' => 'espn' ) --- test: Three trailing newlines in folded blocks brief: > The keep and chomp indicators can also be applied to folded blocks. yaml: | clipped: > This has one newline. same as "clipped" above: "This has one newline.\n" stripped: >- This has no newline. same as "stripped" above: "This has no newline." kept: >+ This has four newlines. same as "kept" above: "This has four newlines.\n\n\n\n" php: | array( 'clipped' => "This has one newline.\n", 'same as "clipped" above' => "This has one newline.\n", 'stripped' => 'This has no newline.', 'same as "stripped" above' => 'This has no newline.', 'kept' => "This has four newlines.\n\n\n\n", 'same as "kept" above' => "This has four newlines.\n\n\n\n" )