diff options
author | Jack Wilsdon <jack.wilsdon@gmail.com> | 2016-10-30 21:57:12 +0000 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2017-07-07 09:42:16 -0700 |
commit | d26947c7f61900ad6c8dc153c9bc8381d413c2f1 (patch) | |
tree | f2cca9da6ab003f71691191c6a045384cfadc632 /tests/test_imports.py | |
parent | a361b74fda6bfd01f389b3e0110f607953e445e0 (diff) | |
download | jinja2-d26947c7f61900ad6c8dc153c9bc8381d413c2f1.tar.gz |
Don't skip an erroneous comma when parsing from
Currently we skip an extra comma when "with context" is not provided to
the "from" statement. This allows invalid code such as this:
{% from "functions.html" import my_function,, %}
The primary issue with this is that it is not consistent when providing
"with context". The following code throws an error, contrary to the
previous example:
{% from "functions.html" import my_function,, with context %}
It seems that the comma skipping was originally found in 0611e49 and was
accidentally put inside the "with context" check in ea847c5. It was then
updated to use "skip_if" in fdf9530.
There doesn't seem to be any reason for this check existing, as
double commas should never be allowed and serve no purpose in the
statement.
Diffstat (limited to 'tests/test_imports.py')
0 files changed, 0 insertions, 0 deletions