-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feat): support "is defined" jinja2 syntax #1015
Comments
noahlange
added a commit
to noahlange/nunjucks
that referenced
this issue
Oct 12, 2017
…lla#1015. - adds 21 Jinja2-style boolean tests - updates node list, parser and compiler to interpret and properly compile `Is` nodes - adds tests for tests, parser and compiler changes/additions - no changes to existing tests - adds `addTest`/`getTest` methods to the environment - CAVEAT: changes lexer to interpret "null" as `null` instead of a lookup to "null" in the context. this was necessary to make the test `null is null` pass - CAVEAT: adds dependency on ES6 Symbols, Maps and Sets for `iterable` and `mapping` tests. These may need to be removed if we're not okay with dumping IE. The tests for these tests require ES6 features and would need to be removed as well.
This was added in #1033 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be great if you could add support for such syntax:
http://jinja.pocoo.org/docs/2.9/templates/#defined
That is working in jinja2 (for ansible templates) and fail here even with compat mode enabled.
The text was updated successfully, but these errors were encountered: