wbond / pybars3

Handlebars.js template support for Python 3 and 2
GNU Lesser General Public License v3.0
179 stars 46 forks source link

Inverted blocks appears to not support {{else}} #17

Closed ticklemepierce closed 8 years ago

ticklemepierce commented 9 years ago

Issue is with demonstrated with the following code:

compiler = Compiler()

source = u"{{^if image}}no image{{else}}image{{/if}}"

template = compiler.compile(source)

output = template({
    'image': 'image'
})

print output

Should print "image", however, it prints nothing as the case cannot be handled.