Closed earandap closed 8 years ago
JavaScript does not parses TT part correctly. Will check it. Thanks.
Solution is not obvious, for now you could use intermediate variable.
The file is a template .tt where I am generating some JavaScript code. The variable b is provided by a controller with dynamic value, I included the declaration for showing you consistent code.
I can use a intermediate variable, but in this project there are a lot of places where is used this snippet of code, and the code is legacy.
But don't worry, in the new code i will use a work around.
Another example.
<script type="text/javascript">
[% comments = 1 %]
[% IF comments # some comment here %]
//javacript comment
[% END %]
function calculate(a){
[% IF negative %]
if( a < 0){
alert('Negative');
return false;
}
[% END %]
return a+10;
}
</script>
Wow, this is nice bug :) Thanks
Please, try http://evstigneev.com/IDEA-Perl5-2.104.zip
Nice!!! Issue solved.