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

Object properties inside tags are formatted incorrectly, breaking the template. #11

Closed jsuddsjr closed 11 months ago

jsuddsjr commented 11 months ago

Correct code:

<form action="{% url 'polls:vote' question.id %}" method="post">

After formatting (note addition of variable brackets). This code will not compile.

<form action="{% url 'polls:vote' {{ question.id }} %}" method="post">

Workaround:

{# prettier-ignore #}
<form action="{% url 'polls:vote' question.id %}" method="post">

Please ignore variables inside tags.