Open craiga opened 1 year ago
Thanks @craiga. Can you help me develop this a bit?
Would any of these be considered a duplicate?
<!-- one inside, one outside -->
<button {% if %} class="" {% endif %} class="">
</button>
<!-- one in else, one outside -->
<button {% if %} id="" {% else %} class="" {% endif %} class="">
</button>
<!-- one in if, one outside -->
<button {% if %} class="" {% else %} id="" {% endif %} class="">
</button>
@christopherpickering I'd say all of those should be reported as duplicates. Is that possible?
That is, you should be able to have one in each of if
and else
, but not one inside if
and another outside if
.
cool!
System Info
Issue
It looks like djLint is finding a duplicate attributes in the if and else clause of an if statement in a Django template.
How To Reproduce
Given this test.html:
…djLint reports a duplicate class attribute:
Contents of .djlintrc/pyproject.toml [tool.djlint]