Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
55 lines (47 sloc) 601 Bytes
=== Spec Example 8.5. Chomping Trailing Lines
--- from: http://www.yaml.org/spec/1.2/spec.html#id2795435
--- tags: spec literal scalar comment
--- in-yaml
# Strip
# Comments:
strip: |-
# text
<SPC><SPC>
# Clip
# comments:
clip: |
# text
<SPC>
# Keep
# comments:
keep: |+
# text
# Trail
# comments.
--- in-json
{
"strip": "# text",
"clip": "# text\n",
"keep": "# text\n\n"
}
--- out-yaml
strip: |-
# text
clip: |
# text
keep: |+
# text
...
--- test-event
+STR
+DOC
+MAP
=VAL :strip
=VAL |# text
=VAL :clip
=VAL |# text\n
=VAL :keep
=VAL |# text\n\n
-MAP
-DOC
-STR
You can’t perform that action at this time.