Permalink
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (46 sloc) 599 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