You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following template (foo in (...)) compiles fine in both Python jinja2 and Jinja2Cpp.
{% macro foo(val) %}
{{1 if val in ('', "''", 'foo')}}
{% endmacro %}
Whereas this slight variant (foo not in (...)) works only in Python jinja2.
{% macro foo(val) %}
{{1 if val not in ('', "''", 'foo')}}
{% endmacro %}
This seems like a bug that it doesn't work in Jinja2Cpp. I'm happy to make the code fix here, but would appreciate some pointers in the code as to what the fix might look like here. I suspect there may be a simple fix here. Help would be much appreciated!
The text was updated successfully, but these errors were encountered:
Here's a very hacky solution from a quick pass over the code. Seems unlikely to be a complete or fully correct solution, but appears like it works for the particular example template that I have.
The following template (
foo in (...)
) compiles fine in both Python jinja2 and Jinja2Cpp.Whereas this slight variant (
foo not in (...)
) works only in Python jinja2.This seems like a bug that it doesn't work in Jinja2Cpp. I'm happy to make the code fix here, but would appreciate some pointers in the code as to what the fix might look like here. I suspect there may be a simple fix here. Help would be much appreciated!
The text was updated successfully, but these errors were encountered: