Author: Kris.Wallsmith
Date: 2010-03-12 17:54:55 +0100 (Fri, 12 Mar 2010)
New Revision: 28511

Modified:
   components/yaml/branches/1.0/lib/sfYamlParser.php
   components/yaml/branches/1.0/test/fixtures/sfTests.yml
   components/yaml/branches/1.0/test/sfYamlDumperTest.php
   components/yaml/branches/1.0/test/sfYamlParserTest.php
   components/yaml/trunk/lib/sfYamlParser.php
   components/yaml/trunk/test/fixtures/sfTests.yml
   components/yaml/trunk/test/sfYamlDumperTest.php
   components/yaml/trunk/test/sfYamlParserTest.php
Log:
[YAML] reverted r28508 (refs #8398)

Modified: components/yaml/branches/1.0/lib/sfYamlParser.php
===================================================================
--- components/yaml/branches/1.0/lib/sfYamlParser.php   2010-03-12 15:18:35 UTC 
(rev 28510)
+++ components/yaml/branches/1.0/lib/sfYamlParser.php   2010-03-12 16:54:55 UTC 
(rev 28511)
@@ -290,9 +290,12 @@
 
     while ($this->moveToNextLine())
     {
-      if ($this->isCurrentLineBlank())
+      if ($this->isCurrentLineEmpty())
       {
-        $data[] = substr($this->currentLine, $newIndent);
+        if ($this->isCurrentLineBlank())
+        {
+          $data[] = substr($this->currentLine, $newIndent);
+        }
 
         continue;
       }

Modified: components/yaml/branches/1.0/test/fixtures/sfTests.yml
===================================================================
--- components/yaml/branches/1.0/test/fixtures/sfTests.yml      2010-03-12 
15:18:35 UTC (rev 28510)
+++ components/yaml/branches/1.0/test/fixtures/sfTests.yml      2010-03-12 
16:54:55 UTC (rev 28511)
@@ -137,31 +137,3 @@
     0123
 php: |
   array('foo' => "0123\n")
----
-test: Comments in folded scalars
-brief: Comments in folded scalars should be kept as is
-yaml: |
-  # comment
-  foo: |
-    # comment
-    bar
-  bar:
-    # comment
-    foo: bar # comment
-    bar: |
-      # comment
-      foo
-    foobar:
-      foo: |
-        # comment
-        bar
-  # comment
-php: |
-  array(
-    'foo' => "# comment\nbar\n",
-    'bar' => array(
-      'foo' => 'bar',
-      'bar' => "# comment\nfoo\n",
-      'foobar' => array('foo' => "# comment\nbar\n")
-    )
-  )

Modified: components/yaml/branches/1.0/test/sfYamlDumperTest.php
===================================================================
--- components/yaml/branches/1.0/test/sfYamlDumperTest.php      2010-03-12 
15:18:35 UTC (rev 28510)
+++ components/yaml/branches/1.0/test/sfYamlDumperTest.php      2010-03-12 
16:54:55 UTC (rev 28511)
@@ -15,7 +15,7 @@
 
 sfYaml::setSpecVersion('1.1');
 
-$t = new lime_test(150);
+$t = new lime_test(149);
 
 $parser = new sfYamlParser();
 $dumper = new sfYamlDumper();

Modified: components/yaml/branches/1.0/test/sfYamlParserTest.php
===================================================================
--- components/yaml/branches/1.0/test/sfYamlParserTest.php      2010-03-12 
15:18:35 UTC (rev 28510)
+++ components/yaml/branches/1.0/test/sfYamlParserTest.php      2010-03-12 
16:54:55 UTC (rev 28511)
@@ -14,7 +14,7 @@
 
 sfYaml::setSpecVersion('1.1');
 
-$t = new lime_test(150);
+$t = new lime_test(149);
 
 $parser = new sfYamlParser();
 

Modified: components/yaml/trunk/lib/sfYamlParser.php
===================================================================
--- components/yaml/trunk/lib/sfYamlParser.php  2010-03-12 15:18:35 UTC (rev 
28510)
+++ components/yaml/trunk/lib/sfYamlParser.php  2010-03-12 16:54:55 UTC (rev 
28511)
@@ -307,9 +307,12 @@
 
     while ($this->moveToNextLine())
     {
-      if ($this->isCurrentLineBlank())
+      if ($this->isCurrentLineEmpty())
       {
-        $data[] = substr($this->currentLine, $newIndent);
+        if ($this->isCurrentLineBlank())
+        {
+          $data[] = substr($this->currentLine, $newIndent);
+        }
 
         continue;
       }

Modified: components/yaml/trunk/test/fixtures/sfTests.yml
===================================================================
--- components/yaml/trunk/test/fixtures/sfTests.yml     2010-03-12 15:18:35 UTC 
(rev 28510)
+++ components/yaml/trunk/test/fixtures/sfTests.yml     2010-03-12 16:54:55 UTC 
(rev 28511)
@@ -143,31 +143,3 @@
     0123
 php: |
   array('foo' => "0123\n")
----
-test: Comments in folded scalars
-brief: Comments in folded scalars should be kept as is
-yaml: |
-  # comment
-  foo: |
-    # comment
-    bar
-  bar:
-    # comment
-    foo: bar # comment
-    bar: |
-      # comment
-      foo
-    foobar:
-      foo: |
-        # comment
-        bar
-  # comment
-php: |
-  array(
-    'foo' => "# comment\nbar\n",
-    'bar' => array(
-      'foo' => 'bar',
-      'bar' => "# comment\nfoo\n",
-      'foobar' => array('foo' => "# comment\nbar\n")
-    )
-  )

Modified: components/yaml/trunk/test/sfYamlDumperTest.php
===================================================================
--- components/yaml/trunk/test/sfYamlDumperTest.php     2010-03-12 15:18:35 UTC 
(rev 28510)
+++ components/yaml/trunk/test/sfYamlDumperTest.php     2010-03-12 16:54:55 UTC 
(rev 28511)
@@ -15,7 +15,7 @@
 
 sfYaml::setSpecVersion('1.1');
 
-$t = new lime_test(151);
+$t = new lime_test(150);
 
 $parser = new sfYamlParser();
 $dumper = new sfYamlDumper();

Modified: components/yaml/trunk/test/sfYamlParserTest.php
===================================================================
--- components/yaml/trunk/test/sfYamlParserTest.php     2010-03-12 15:18:35 UTC 
(rev 28510)
+++ components/yaml/trunk/test/sfYamlParserTest.php     2010-03-12 16:54:55 UTC 
(rev 28511)
@@ -14,7 +14,7 @@
 
 sfYaml::setSpecVersion('1.1');
 
-$t = new lime_test(151);
+$t = new lime_test(150);
 
 $parser = new sfYamlParser();
 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to