ArcherHume / jinja2-support

Highlighting and indentation for Jinja2 templates
7 stars 2 forks source link

Syntax highlighting does not work correctly #3

Open extra4be opened 2 months ago

extra4be commented 2 months ago

Good day. Syntax highlighting does not work correctly. jinja2 - bug

In this case, it identifies the keywords "set" and "as" where they are not present. Thank you very much for your work.

{% macro render_field(field, cls, errcls) %}
  {% if field.type == "BooleanField" %}
    <fieldset role="group">
      <label for="{{ field.id }}">
        {{ field(class = cls, role="switch", **kwargs) | safe }}
        {{ field.label.text }}
      </label>
    </fieldset>
  {% else %}
    <fieldset class="modal-field-container">
      <label for="{{ field.id }}" class="modal-field-label">{{ field.label.text }}</label>
      {{ field(class = cls, **kwargs) | safe }}
    </fieldset>
  {% endif %}
{% endmacro %}
ArcherHume commented 2 months ago

Hey @extra4be, been a busy few days, will try to take a look at this tonight. Shouldn't be super tough to fix :)