blueimp/JavaScript-Templates

Does not support the if the grammar??

Closed this issue · 2 comments

In you demo:
{%if(o.features.length){%}
{%=o.features[1]%}
{%}%}

is error? Why?

OK, I know what's going on. Must changed to:
{%if(o.features.length){ %}
{%=o.features[1]%}
{% } %}

So I think choose the delimiter is not very good. Change to the <% %> may be better!

You can change the delimiters via the tmpl.regep option, as explained here:
https://github.com/blueimp/JavaScript-Templates#template-parsing