Closed jcubic closed 7 years ago
There is only limited set of things that could be arguments. As far as I remember neither =~
nor /bar/
are not valid arguments. So the only option is to use strings like "=~"
and "/bar/"
.
Also, I don't think that rewriting of one of built-in helpers is a good idea.
Also, you could implement a helper like:
{{#ifMatchRegExp value pattern}}
Yep, it matches.
{{/ifMatchRegExp}}
I've fixed this by adding quotes before calling render.
I want to implement my own if helper that will have arbitrary expressions like this:
but this throw
InvalidArgumentException: Malformed arguments string
, the solution is to use quotes for the whole thing but it would be nice if the lib will allow to use any text.