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

Don't skip an erroneous comma when parsing "from" #617

Merged
merged 2 commits into from Jul 7, 2017
Merged

Don't skip an erroneous comma when parsing "from" #617

merged 2 commits into from Jul 7, 2017

Commits on Jul 7, 2017

  1. 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.
    jackwilsdon authored and davidism committed Jul 7, 2017
    Copy the full SHA
    d26947c View commit details
    Browse the repository at this point in the history
  2. add test and changelog

    davidism committed Jul 7, 2017
    Copy the full SHA
    8f46bec View commit details
    Browse the repository at this point in the history