tdammers / ginger

A Haskell implementation of the Jinja template language.
MIT License
77 stars 13 forks source link

Logical operators should be and/or instead of &&/|| #31

Closed wchresta closed 6 years ago

wchresta commented 6 years ago

Jinja2 uses the python-style logical operators:

>>> Template('{{ False and True or False }}').render()
'False'

while ginger uses && and || and rejects and and or. Ginger should use the python-style logic operators and reject &&.

tdammers commented 6 years ago

IIRC, && and || are simply invalid syntax in Jinja2, so supporting them when Jinja does not isn't going to break any Jinja templates on Ginger, but would make Ginger more useful. (In other words, being able to run Jinja templates on Ginger has a much higher priority for me than the other way around).

wchresta commented 6 years ago

Alright, I'll adapt the fix to support both, and and &&