Closed stevenmunro closed 7 years ago
This works for
'expressionLanguage' => 'js'
Not for
'expressionLanguage' => 'php'
php
means you must write expressions in PHP:
p #{$_message}
auto
mode is like PHP but will do just some basic transformations such as add $
and handle simple .
getters. So in auto
mode, you can also use p #{_message}
.
js
mode convert JS codes in PHP with a dedicated parser/compiler.
I don't know if this is an actual bug but it is my desire to have my variables begin with an underscore (for other reasons). However it appears that these can not be parsed.
$html = $this->pugrenderer->render($template, [
'_message' => 'hello'
]);
p #{_message}
Is there a way around this?