Permalink
Browse files

Loosening two regexes a bit, removed a newline.

- Regex matching package name allows more signs (dots, but also spaces)
- Regex matching yaml header now just looks for the first multiline comment,
  doesn't have to be on the first line.
- Removed the newline between the shebang and <?php, it printed a useless
  newline.
  • Loading branch information...
1 parent 606e2d8 commit 9bf0e930b5d5367d20da9769c5576d94feebdace @timwienk timwienk committed May 8, 2010
Showing with 2 additions and 3 deletions.
  1. +1 −2 packager
  2. +1 −1 packager.php
View
@@ -1,5 +1,4 @@
#!/usr/bin/env php
-
<?php
require dirname(__FILE__) . '/packager.php';
@@ -112,7 +111,7 @@ switch ($command){
foreach ($selected['add-packages'] as $package_path) $pkg->add_package($package_path);
foreach ($selected['remove-packages'] as $package_name) $pkg->remove_package($package_name);
- $re = "/^([\w-]+)\/\*$/";
+ $re = "/^([^\/]+)\/\*$/";
$wildcards = array();
$files = $selected['files'];
View
@@ -46,7 +46,7 @@ private function parse_manifest($package_path){
$descriptor = array();
// get contents of first comment
- preg_match('/^\s*\/\*\s*(.*?)\s*\*\//s', $source, $matches);
+ preg_match('/\s*\/\*\s*(.*?)\s*\*\//s', $source, $matches);
if (!empty($matches)){
// get contents of YAML front matter

0 comments on commit 9bf0e93

Please sign in to comment.