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.
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.