blueimp/JavaScript-Templates

How to use Mod (%) operator in blueimp javascript template

Closed this issue · 1 comments

I wanted to use an expression that contains Mod (%) operator but the template generates an error saying : "SyntaxError: illegal character". How can I get rid of it.

My code is something like below:

{%
for( var i = 0, venue; venue = o[i] ; i++){

if( ! (i % 2) ) {
// do something with 'venue'
}

}
%}

This was a bug in the tmpl regular expression, thanks for the report! :)