Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

Commit

Permalink
hack to support unindented lists
Browse files Browse the repository at this point in the history
  • Loading branch information
subtleGradient committed Dec 15, 2009
1 parent f1ed59c commit e4d70a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public function __construct($manifest_path){

// yaml header
preg_match("/\/\*\s*[-]{3}(.*)[.]{3}\s*\*\//s", $file, $matches); // this is a crappy regexp :)
$descriptor = YAML::decode($matches[1]);

// hack to support unindented lists. hell might break loose. -- Taken from http://github.com/Guille/PluginsKit by Guillermo Rauch
$rawYAML = preg_replace('/$([\s]+)-/m', '$1 -', trim($matches[1]));

$descriptor = YAML::decode($rawYAML);

// populate / convert to array requires and provides

Expand Down

0 comments on commit e4d70a9

Please sign in to comment.