Development

Changeset 8869

You must first sign up to be able to contribute.

Changeset 8869

Show
Ignore:
Timestamp:
05/09/08 02:22:57 (1 week ago)
Author:
dwhittle
Message:

dwhittle: fixed yaml regression (resolves #3127)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/yaml/sfYamlParser.class.php

    r8489 r8869  
    8888          if (preg_match('/^([^ ]+)\: +({.*?)$/', $values['value'], $matches)) 
    8989          { 
    90             $data[$matches[1]] = sfYamlInline::load($matches[2]); 
     90            $data[] = array($matches[1] => sfYamlInline::load($matches[2])); 
    9191          } 
    9292          else 
  • branches/1.1/test/unit/yaml/fixtures/sfTests.yml

    r8489 r8869  
    1 --- %YAML:1.0  
     1--- %YAML:1.0 
    22test: Multiple quoted string on one line 
    3 brief: >  
     3brief: > 
    44    Multiple quoted string on one line 
    5 yaml: |  
     5yaml: | 
    66    stripped_title: { name: "foo bar", help: "bar foo" } 
    7 php: |  
     7php: | 
    88    array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo')) 
    99--- 
    1010test: Empty sequence 
    11 yaml: |  
     11yaml: | 
    1212    foo: [ ] 
    1313php: | 
     
    6363--- 
    6464test: Empty lines in folded blocks 
    65 brief: >  
     65brief: > 
    6666  Empty lines in folded blocks 
    6767yaml: | 
     
    6969    bar: | 
    7070      foo 
    71        
     71 
    7272 
    7373         
     
    7777--- 
    7878test: IP addresses 
    79 brief: >  
     79brief: > 
    8080  IP addresses 
    8181yaml: | 
     
    8585--- 
    8686test: A sequence with an embedded mapping 
    87 brief: >  
     87brief: > 
    8888  A sequence with an embedded mapping 
    8989yaml: | 
     
    9191  - bar: { bar: foo } 
    9292php: | 
    93   array('foo', 'bar' => array('bar' => 'foo')) 
     93  array('foo', array('bar' => array('bar' => 'foo')))