samuelcolvin / jinjahtml-vscode

Syntax highlighting for jinja(2) html templates in vscode
https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
MIT License
135 stars 53 forks source link

HTML template formatting error with less-than sign inside template tag #138

Open NHanser opened 1 year ago

NHanser commented 1 year ago

For example following code

{% if something < other %} 
<p>Do something</p>
{% endif %}

becomes

{% if something < other %} <p>Do something</p>
  {% endif %}

after formatting. I suspect than "less-than is first interated as a start of HTML tag, but, as it is inside a jinja template tage, it doesn't make sense...

Maksych commented 1 year ago

Have same issue with greater than.

<button {% if something > other %}disabled{% endif %}></button>