You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into many problems with the automatic variable name substitution, and start to believe it's not a good idea to do this. For example, this code is causing issues:
open = pages->findOpen()
items = open ? open->children()->visible() : false
As you can see, in the second statement, the second occurrence of open does not get replaced.
I have therefore created my own version of jade.php that removes this variable translation, and explicitly use the $-sign in the templates: https://github.com/lehni/jade.php
Don't you think this would make more sense for a PHP based Jade? I am wondering what the official take is on these kind of problems?
The text was updated successfully, but these errors were encountered:
Thinking more about this, I get a feeling you are making a mistake with the trial to automatically translate JavaScript syntax in Jade templates to PHP on the fly. Without a real JavaScript AST Parser this will never work 100% correctly. Also, to me it feels more aligned with the idea of Jade for PHP that it would actually support PHP Syntax inside the Templates, and this aim should be much easier to achieve.
I am running into many problems with the automatic variable name substitution, and start to believe it's not a good idea to do this. For example, this code is causing issues:
This gets wrongly translated to:
As you can see, in the second statement, the second occurrence of open does not get replaced.
I have therefore created my own version of jade.php that removes this variable translation, and explicitly use the $-sign in the templates: https://github.com/lehni/jade.php
Don't you think this would make more sense for a PHP based Jade? I am wondering what the official take is on these kind of problems?
The text was updated successfully, but these errors were encountered: