doy / text-handlebars

http://handlebarsjs.com/ for Text::Xslate
http://metacpan.org/release/Text-Handlebars
6 stars 9 forks source link

Question: Are subexpressions supported? #13

Open bpj opened 5 years ago

bpj commented 5 years ago

I can't get subexpressions to work; get "unknown token" all the time. Are they not supported?

aaminoff commented 5 years ago

I was just wondering the same thing. I defined a helper called "eq", in the template I said

{{#if (eq user.username "alex_aminoff") }}

got

Oops: Unexpected token '(eq' at /usr/local/lib/perl5/site_perl/Text/Xslate/Syntax/Handlebars.pm line 289.

Subexpressions with parentheses appear to be defined by the Handlebars.js spec, about 3/4 of the way down this page:

https://handlebarsjs.com/expressions.html