Skip to content
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

Warn user when they haven't quoted dictionary keys in Jinja files #47

Open
lfdebrux opened this issue Nov 7, 2019 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@lfdebrux
Copy link
Contributor

lfdebrux commented Nov 7, 2019

In Nunjucks files we automagically quote the keys of dictionaries, because if Jinja sees a dictionary with unquoted keys it silently ignores the values; see lines 29 to 32 in njk_to_j2().

It would be nice if we could catch this error in non-Nunjucks templates, as it is quite a common mistake when copying code from examples for Nunjucks.

@lfdebrux lfdebrux added the enhancement New feature or request label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant