I just noticed surprising behavior when comparing a field against string literals.
{%- if foo == "bar" %}
Produces the following error:
jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'bar'
I can resolve this problem by replacing the double-quoted string literal with a single-quote string literal. This works:
Why don't the two kinds of string literals behave the same?
This might be specific to my environment, which is version 2.10 running in a python2.7 environment with utf-8 encoded strings. I haven't really done my due diligence to make a standalone reproduction case yet, but I'm still throwing my observation onto the list in case anybody else has encountered this before, too.