Permalink
Browse files

YAML parser fix ("fix" is used loosely here, it really is a hack)

  • Loading branch information...
1 parent 6db4fca commit 67137a2d08ef37e252b9eeebe018e11013a88303 @rauchg committed Dec 10, 2009
Showing with 10 additions and 9 deletions.
  1. +2 −1 lib/ForgeJSParser.class.php
  2. +8 −8 web/test.php
@@ -22,7 +22,8 @@ public function __construct($data){
throw new ForgeJSParserException('Couldn\'t find required YAML header in JS file.');
}
- $this->rawYaml = trim($yaml[2][0]);
+ // hack to support unindented lists. hell might break loose.
+ $this->rawYaml = preg_replace('/$([\s]+)-/m', '$1 -', trim($yaml[2][0]));
try {
$this->yaml = new ForgeYamlParser($this->rawYaml);
View
@@ -29,7 +29,7 @@ public function __construct($data){
throw new ForgeJSParserException('Could not find required YAML header in JS file.');
}
- $this->rawYaml = trim($yaml[2][0]);
+ $this->rawYaml = preg_replace('/$([\s]+)-/m', '$1 -', trim($yaml[2][0]));
try {
$this->yaml = new sfYamlParser();
@@ -60,13 +60,13 @@ class ForgeJSParserException extends Exception {}
license: MIT-style
requires:
core/1.2.3:
- - Class.Extras
- - Element.Event
- - Element.Style
- - Element.Dimensions
- - Fx.Tween
- - String
- - Array
+ - Class.Extras
+ - Element.Event
+ - Element.Style
+ - Element.Dimensions
+ - Fx.Tween
+ - String
+ - Array
description: A fully-automated, flexible, customizable carousel class for Mootools.
authors:
- 3n

0 comments on commit 67137a2

Please sign in to comment.