Closed brammittendorff closed 2 years ago
When using the following template code in Django templates:
templates/test.html
<input type="{{ field.field.widget.input_type }}" {% for key, value in field.field.widget.attrs.items %}{{ key }}="{{ value }}" {% endfor %}>
or
<input type="{{ field.field.widget.input_type }}" {% for key, value in field.field.widget.attrs.items %} {{ key }}="{{ value }}" {% endfor %}>
It gives a parse error:
❯ curlylint ~/templates/test.html ~/templates/test.html 0:114 Parse error: expected one of '/', '>', 'attribute', 'space(s) between attributes', '{#', '{%', '{{' at 0:114 parse_error Oh no! 💥 💔 💥 1 error reported
I searched for in the issue tracker for:
Django error Django parse_error
But i couldn't find the same kind of issue.
❯ curlylint --version curlylint, version 0.13.0
Windows 10
And also:
Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal
(Write your steps here:)
curlylint test.html
It shouldn't complain about a parse_error because this is regular Django template language.
It gives a parse_error:
❯ curlylint test.html test.html 0:114 Parse error: expected one of '/', '>', 'attribute', 'space(s) between attributes', '{#', '{%', '{{' at 0:114 parse_error Oh no! 💥 💔 💥 1 error reported
Hi @brammittendorff, thank you for taking the time to report this with so many details! I believe this is the same issue as #23, so I’ll close in favour of that older entry.
Describe the bug
When using the following template code in Django templates:
templates/test.html
or
It gives a parse error:
Which terms did you search for in the documentation and issue tracker?
I searched for in the issue tracker for:
But i couldn't find the same kind of issue.
Environment
Version
OS
And also:
Steps to reproduce
(Write your steps here:)
Expected behavior
It shouldn't complain about a parse_error because this is regular Django template language.
Actual behavior
It gives a parse_error: