-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement assets, all helpers, minification, globals
- Loading branch information
1 parent
b1c98fa
commit ae72a7e
Showing
3 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Jade\Symfony; | ||
|
||
use Jade\Jade; | ||
|
||
class JadeEngine extends Jade | ||
{ | ||
/** | ||
* Compile PHP code from a Pug input or a Pug file. | ||
* | ||
* @param string input | ||
* | ||
* @throws \Exception | ||
* | ||
* @return string | ||
*/ | ||
public function compile($input) | ||
{ | ||
$php = parent::compile($input); | ||
$php = preg_replace('/(\\Jade\\Compiler::getPropertyFromAnything\((?:[^()]++|(?R))*+\))\(((?:[^()]++|(?R))*+)\)/', 'call_user_func($1, $2)', $php); | ||
|
||
return $php; | ||
} | ||
} |