Skip to content

Commit

Permalink
YAML parser fix ("fix" is used loosely here, it really is a hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Dec 10, 2009
1 parent 6db4fca commit 67137a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion lib/ForgeJSParser.class.php
Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions web/test.php
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 67137a2

Please sign in to comment.