Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Formatter] #1211

Open
3 tasks done
Dufran opened this issue Apr 2, 2025 · 0 comments
Open
3 tasks done

[BUG] [Formatter] #1211

Dufran opened this issue Apr 2, 2025 · 0 comments
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@Dufran
Copy link

Dufran commented Apr 2, 2025

System Info

  • OS: macos 15.4
  • Python 3.12.1
  • djLint 1.36.4
  • template language: django temlates + htmx

Issue

Code like this resulting in error H025 for last div element

{% block content %}
    <div class="position-relative page-content">
        {% if request.user %}
            <div hx-get="{% url 'feature-list' %}?{{ request.get_full_path|get_query_string }}"
                hx-trigger="load, refresh from:body"
                {# djlint:off #}
                hx-target-5*="#ajax-error"
                {# djlint:on #}
                hx-indicator="#loader"
                id="feature-list"></div>
            {% include "partials/common/loader.html" %}
        {% else %}
            Empty data
        {% endif %}
    </div>
{% endblock content %}

If i don't disable djlint for attribute hx-target-5* it formats and brake behavior

<div hx-get="{% url 'feature-list' %}?{{ request.get_full_path|get_query_string }}"
                 hx-trigger="load, refresh from:body"
                 hx-target-5
                 None="#ajax-error"
                 hx-indicator="#loader"
                 id="feature-list"></div>

The root problem here is my weird attribute hx-target-5*, would be great if this can be supported.

@Dufran Dufran added 🦠 bug Something isn't working 🧽 formatter labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦠 bug Something isn't working 🧽 formatter
Projects
None yet
Development

No branches or pull requests

1 participant