Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (81 sloc) 1.08 KB
=== Whitespace around colon in mappings
--- from: @perlpunk
--- tags: alias mapping whitespace
--- in-yaml
"top1" :<SPC>
"key1" : &alias1 scalar1
'top2' :<SPC>
'key2' : &alias2 scalar2
top3: &node3<SPC>
*alias1 : scalar3
top4:<SPC>
*alias2 : scalar4
top5 :<SPC><SPC><SPC><SPC>
scalar5
top6:<SPC>
&anchor6 'key6' : scalar6
--- in-json
{
"top1": {
"key1": "scalar1"
},
"top2": {
"key2": "scalar2"
},
"top3": {
"scalar1": "scalar3"
},
"top4": {
"scalar2": "scalar4"
},
"top5": "scalar5",
"top6": {
"key6": "scalar6"
}
}
--- out-yaml
"top1":
"key1": &alias1 scalar1
'top2':
'key2': &alias2 scalar2
top3: &node3
*alias1 : scalar3
top4:
*alias2 : scalar4
top5: scalar5
top6:
&anchor6 'key6': scalar6
--- test-event
+STR
+DOC
+MAP
=VAL "top1
+MAP
=VAL "key1
=VAL &alias1 :scalar1
-MAP
=VAL 'top2
+MAP
=VAL 'key2
=VAL &alias2 :scalar2
-MAP
=VAL :top3
+MAP &node3
=ALI *alias1
=VAL :scalar3
-MAP
=VAL :top4
+MAP
=ALI *alias2
=VAL :scalar4
-MAP
=VAL :top5
=VAL :scalar5
=VAL :top6
+MAP
=VAL &anchor6 'key6
=VAL :scalar6
-MAP
-MAP
-DOC
-STR
You can’t perform that action at this time.