Changeset 8868
- Timestamp:
- 05/09/08 01:25:54 (1 week ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dwhittle/1.1/lib/yaml/sfYamlParser.class.php
r8490 r8868 88 88 if (preg_match('/^([^ ]+)\: +({.*?)$/', $values['value'], $matches)) 89 89 { 90 $data[ $matches[1]] = sfYamlInline::load($matches[2]);90 $data[] = array($matches[1] => sfYamlInline::load($matches[2])); 91 91 } 92 92 else branches/dwhittle/1.1/test/unit/yaml/fixtures/sfTests.yml
r8490 r8868 1 --- %YAML:1.0 1 --- %YAML:1.0 2 2 test: Multiple quoted string on one line 3 brief: > 3 brief: > 4 4 Multiple quoted string on one line 5 yaml: | 5 yaml: | 6 6 stripped_title: { name: "foo bar", help: "bar foo" } 7 php: | 7 php: | 8 8 array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo')) 9 9 --- 10 10 test: Empty sequence 11 yaml: | 11 yaml: | 12 12 foo: [ ] 13 13 php: | … … 63 63 --- 64 64 test: Empty lines in folded blocks 65 brief: > 65 brief: > 66 66 Empty lines in folded blocks 67 67 yaml: | … … 69 69 bar: | 70 70 foo 71 71 72 72 73 73 … … 77 77 --- 78 78 test: IP addresses 79 brief: > 79 brief: > 80 80 IP addresses 81 81 yaml: | … … 85 85 --- 86 86 test: A sequence with an embedded mapping 87 brief: > 87 brief: > 88 88 A sequence with an embedded mapping 89 89 yaml: | … … 91 91 - bar: { bar: foo } 92 92 php: | 93 array('foo', 'bar' => array('bar' => 'foo'))93 array('foo', array('bar' => array('bar' => 'foo')))