-
Notifications
You must be signed in to change notification settings - Fork 25
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
Parse error for start tags in conditional #19
Comments
thibaudcolas
changed the title
Parse error for start tags added in conditional
Parse error for start tags in conditional
May 9, 2019
thibaudcolas
added a commit
to thibaudcolas/wagtail
that referenced
this issue
May 9, 2019
See motet-a/jinjalint#19 for further details.
thibaudcolas
added a commit
to thibaudcolas/wagtail
that referenced
this issue
May 9, 2019
See motet-a/jinjalint#19 for further details.
thibaudcolas
added a commit
to thibaudcolas/wagtail
that referenced
this issue
May 10, 2019
See motet-a/jinjalint#19 for further details.
thibaudcolas
added a commit
to wagtail/wagtail
that referenced
this issue
May 10, 2019
See motet-a/jinjalint#19 for further details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following Django template,
Jinjalint will produce the following parse error:
This is quite a common pattern in templates, that's not the most readable for a small example like this but is usually used to limit repetition. Refactoring this to a more straightforward
<div class="{% if has_sidebar %}col10{% else %}col12{% endif %}">
is possible in simple cases, but it might not always be desirable. It would be nice if jinjalint was able to parse this, understanding the conditional and the fact that in practice there will always be one and only one openingdiv
.The text was updated successfully, but these errors were encountered: