djLint icon indicating copy to clipboard operation
djLint copied to clipboard

[BUG] [Formatter] inline conditions cause problems

Open Zackhardtoname opened this issue 2 years ago • 2 comments

System Info

  • OS: e.g. ubuntu 20.04
  • Python Version (python --version)
  • djLint Version (djlint --version)
  • template language: e.g. mustache

Issue

If we have an else statement after an inlined if + else statement, the else statement would be matched with the if statement instead of the outer if statement.

Might be fixable together with #182

How To Reproduce

Zackhardtoname avatar Nov 05 '23 21:11 Zackhardtoname

Thanks for opening your first issue here!

welcome[bot] avatar Nov 05 '23 21:11 welcome[bot]

Hey @Zackhardtoname can you give a code snippet?

christopherpickering avatar Dec 12 '23 17:12 christopherpickering