1 |
--- %YAML:1.0 |
2 |
test: Comments at the end of a line |
3 |
brief: > |
4 |
Comments at the end of a line |
5 |
yaml: | |
6 |
ex1: "foo # bar" |
7 |
ex2: "foo # bar" # comment |
8 |
ex3: 'foo # bar' # comment |
9 |
ex4: foo # comment |
10 |
php: | |
11 |
array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo') |
12 |
--- |
13 |
test: Comments in the middle |
14 |
brief: > |
15 |
Comments in the middle |
16 |
yaml: | |
17 |
foo: |
18 |
# some comment |
19 |
# some comment |
20 |
bar: foo |
21 |
# some comment |
22 |
# some comment |
23 |
php: | |
24 |
array('foo' => array('bar' => 'foo')) |
25 |
--- |
26 |
test: Comments on a hash line |
27 |
brief: > |
28 |
Comments on a hash line |
29 |
yaml: | |
30 |
foo: # a comment |
31 |
foo: bar # a comment |
32 |
php: | |
33 |
array('foo' => array('foo' => 'bar')) |
34 |
--- |
35 |
test: 'Value starting with a #' |
36 |
brief: > |
37 |
'Value starting with a #' |
38 |
yaml: | |
39 |
foo: '#bar' |
40 |
php: | |
41 |
array('foo' => '#bar') |
42 |
--- |
43 |
test: Document starting with a comment and a separator |
44 |
brief: > |
45 |
Commenting before document start is allowed |
46 |
yaml: | |
47 |
# document comment |
48 |
--- |
49 |
foo: bar # a comment |
50 |
php: | |
51 |
array('foo' => 'bar') |