junstyle / vscode-django-support

django formatter, highlight...
https://marketplace.visualstudio.com/items?itemName=junstyle.vscode-django-support
Apache License 2.0
4 stars 0 forks source link

href="{% url 'index' %}, Error: Invalid Token. Expected stringEnd but found tag start "{%" instead. #3

Closed vilkoz closed 1 year ago

vilkoz commented 1 year ago
<a class="navbar-brand" href="{% url 'index' %}">Django</a>

ERROR: Invalid Token. Expected stringEnd but found tag start "{%" instead

junstyle commented 1 year ago

attribute can't contain tag '{%'. you must use {{ }}

you can use filter in {{ }}

vilkoz commented 1 year ago

Another extension works fine in this case, Django also doesn't complain about it. P.S. appreciate the work developing the extension, just thought it is unintended behaviour