Permalink
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (54 sloc) 959 Bytes
=== Spec Example 6.1. Indentation Spaces
--- from: http://www.yaml.org/spec/1.2/spec.html#id2777865
--- tags: spec indent upto-1.2
--- in-yaml
# Leading comment line spaces are
# neither content nor indentation.
<SPC><SPC><SPC><SPC>
Not indented:
By one space: |
By four
spaces
Flow style: [ # Leading spaces
By two, # in flow style
Also by two, # are neither
<TAB>Still by two # content nor
] # indentation.
--- in-json
{
"Not indented": {
"By one space": "By four\n spaces\n",
"Flow style": [
"By two",
"Also by two",
"Still by two"
]
}
}
--- out-yaml
Not indented:
By one space: |
By four
spaces
Flow style:
- By two
- Also by two
- Still by two
--- test-event
+STR
+DOC
+MAP
=VAL :Not indented
+MAP
=VAL :By one space
=VAL |By four\n spaces\n
=VAL :Flow style
+SEQ
=VAL :By two
=VAL :Also by two
=VAL :Still by two
-SEQ
-MAP
-MAP
-DOC
-STR