2 test: Comments at the end of a line
4 Comments at the end of a line
7 ex2: "foo # bar" # comment
8 ex3: 'foo # bar' # comment
10 ex5: foo # comment with tab before
11 ex6: foo#foo # comment here
12 ex7: foo # ignore me # and me
14 array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo', 'ex5' => 'foo', 'ex6' => 'foo#foo', 'ex7' => 'foo')
16 test: Comments in the middle
18 Comments in the middle
27 array('foo' => array('bar' => 'foo'))
29 test: Comments on a hash line
31 Comments on a hash line
36 array('foo' => array('foo' => 'bar'))
38 test: 'Value starting with a #'
40 'Value starting with a #'
44 array('foo' => '#bar')
46 test: Document starting with a comment and a separator
48 Commenting before document start is allowed
56 test: Comment containing a colon on a hash line
58 Comment containing a colon on a scalar line
59 yaml: 'foo # comment: this is also part of the comment'
63 test: 'Hash key containing a #'
65 'Hash key containing a #'
68 array('foo#bar' => 'baz')
70 test: 'Hash key ending with a space and a #'
72 'Hash key ending with a space and a #'
76 array('foo #' => 'baz')