Here is the next patch: - More complete YAML block scalar support (>, |) including chomping and block identation indicators. - Internal support for emptyValue. That can be "-\n" produce "array(Null)" instead of "array('')".
patch
Logged In: NO
This fix parsing then block scalar at end of file.
[code] Index: spyc.php5 =================================================================== --- spyc.php5 +++ spyc.php5 @@ -664,12 +664,12 @@ private function returnLiteralBlock ($line, $sbinfo) { $lines = array(); while (false !== ($textline = $this->nextLine()) && $this->blockScalarContinues($textline, $sbinfo)) { - $textline = $this->stripIndent($textline, $sbinfo['indent']); + $_line = $this->stripIndent($textline, $sbinfo['indent']); // HACK : 2007-09-15 : lucky // we must take (wrong indented) empty lines too - $lines[] = ($textline === false) ? $this->eol : $textline; + $lines[] = ($_line === false) ? $this->eol : $_line; } - $this->line--; + if ($textline !== false) $this->line--; return $lines; }
[/code]
Log in to post a comment.
patch
Logged In: NO
This fix parsing then block scalar at end of file.
[code]
Index: spyc.php5
===================================================================
--- spyc.php5
+++ spyc.php5
@@ -664,12 +664,12 @@
private function returnLiteralBlock ($line, $sbinfo) {
$lines = array();
while (false !== ($textline = $this->nextLine()) && $this->blockScalarContinues($textline, $sbinfo)) {
- $textline = $this->stripIndent($textline, $sbinfo['indent']);
+ $_line = $this->stripIndent($textline, $sbinfo['indent']);
// HACK : 2007-09-15 : lucky
// we must take (wrong indented) empty lines too
- $lines[] = ($textline === false) ? $this->eol : $textline;
+ $lines[] = ($_line === false) ? $this->eol : $_line;
}
- $this->line--;
+ if ($textline !== false) $this->line--;
return $lines;
}
[/code]