coolony / kiwi

Simple yet powerful asynchronous JavaScript template engine based on jQuery Template syntax, usable server-side or client-side.
MIT License
41 stars 6 forks source link

include within an if creates a SyntaxError #28

Open ckknight opened 11 years ago

ckknight commented 11 years ago
{{if x}}
  {{include 'item'}}
{{/if}}

And I get the following

SyntaxError: Unexpected identifier
    at Object.Function (<anonymous>)
    at onCompiled (/Users/ckknight/Development/project/node_modules/kiwi/lib/compiler.js:73:14)
    at onCompiled (/Users/ckknight/Development/project/node_modules/kiwi/lib/token.js:182:5)
    at /Users/ckknight/Development/project/node_modules/kiwi/lib/utils.js:240:5
    at done (/Users/ckknight/Development/project/node_modules/kiwi/lib/utils.js:219:5)
    ...

It also fails with an else clause.