Skip to content

Commit

Permalink
Merge e053521 into e19227e
Browse files Browse the repository at this point in the history
  • Loading branch information
Zordius committed Jun 4, 2014
2 parents e19227e + e053521 commit ea13151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lightncandy.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ protected static function getPHPCode($closure) {
$file->seek($ref->getEndLine() - 1);
$epos = $file->ftell();

return preg_replace('/^.*?function\s.*?\\((.+?)\\}[,\\s]*;?$/s', 'function($1}', substr($lines, $spos, $epos - $spos));
return preg_replace('/^.*?function\s*?\\((.+?)\\}[,\\s]*;?$/s', 'function($1}', substr($lines, $spos, $epos - $spos));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/issue44.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$template = '<div class="terms-text"> {{render "artists-terms"}} </div>';

$compileOptions = [
'flags' => LightnCandy::FLAG_HANDLEBARSJS,
'flags' => LightnCandy::FLAG_HANDLEBARSJS | LightnCandy::FLAG_ERROR_LOG | LightnCandy::FLAG_EXTHELPER,
'helpers' => [
'url',
'render' => function($view,$data = array()) {
Expand Down

0 comments on commit ea13151

Please sign in to comment.