Closed esiao closed 7 years ago
Hi, next major version with allow this syntax. I hope you can wait until this release. It could take time.
That's nice to hear, looking forward then.
Hi, there is a new option now available to use the native pugjs engine (until the 3.0):
$pug = new Pug(array(
'pugjs' => true
));
echo $pug->render('
-
var list = ["Uno", "Dos", "Tres",
"Cuatro", "Cinco", "Seis"]
each item in list
li= item
');
This is a pure wrapper solution with no PHP support in templates (all run with node.js).
You can update to 3.0.0-alpha2
(witouht pugsjs
option), it should be fixed. Please don't hesitate to test the new pug-php 3 and give us your feedback.
pug offers a nice way to do tests, assign variables... within a pug template by using the unbuffered code block style. See: https://pugjs.org/language/code.html#unbuffered-code
With pug-php it's not possible, as the Parser crashes with
Unexpected token "indent"
error. Would it be possible to implement? Saying that using this syntax would actually be executed as a php block with the current scope. Would love to see this feature coming to pug-php.Thanks.