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

Add stricter checking to "from ... import ..." #618

Merged
merged 2 commits into from Jul 7, 2017
Merged

Add stricter checking to "from ... import ..." #618

merged 2 commits into from Jul 7, 2017

Commits on Jul 7, 2017

  1. Add stricter checking to "from ... import ..."

    Currently token parsing on "from ... import ..." is rather "loose" — it
    sees the following "invalid" code as perfectly valid:
    
      {% from "functions" import my_function, %}
      {% from "functions" import, %}
      {% from "functions" import %}
    
    This is caused by the parser ignoring non-name values where there should
    be names, either as the first value or after commas.
    
    This commit ensures only name values are allowed as the first value and
    any values after commas in the import section.
    jackwilsdon authored and davidism committed Jul 7, 2017
    Copy the full SHA
    5d79372 View commit details
    Browse the repository at this point in the history
  2. add tests and changelog

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