Ignorer le code

Le code peut être ignoré en l’entourant de balises djlint :

Pour le simple html -

<!-- djlint:off -->
   <mauvais html à ignorer>
<!-- djlint:on -->

ou comme un commentaire -

{# djlint:off #}
   <mauvais html à ignorer>
{# djlint:on #}

ou comme un long commentaire -

{% comment %} djlint:off {% endcomment %}
   <mauvais html à ignorer>
{% comment %} djlint:on {% endcomment %}

ou comme un commentaire de style golang -

{{ /* djlint:off */ }}
   <mauvais html à ignorer>
{{ /* djlint:on */ }}

ou comme un commentaire de style handlebars -

{{!-- djlint:off --}}
   <mauvais html à ignorer>
{{!-- djlint:on --}}

Ignorer les règles

Des règles spécifiques de linter peuvent également être ignorées en ajoutant le nom de la règle dans la balise d’ouverture du bloc ignoré.

{# djlint:off H025,H026 #}
<p>
{# djlint:on #}

<!-- djlint:off H025-->
<p>
<!-- djlint:on -->

{% comment %} djlint:off H025 {% endcomment %}
<p>
{% comment %} djlint:on {% endcomment %}

{{!-- djlint:off H025 --}}
<p>
{{!-- djlint:on --}}

{{ /* djlint:off H025 */ }}
<p>
{{ /* djlint:on */ }}
Modifier cette page Actualisé Sep 3, 2026