adamchainz / djade

A Django template formatter.
MIT License
281 stars 4 forks source link

Detect, and fix, template tags broken over multiple lines #98

Open jarshwah opened 2 weeks ago

jarshwah commented 2 weeks ago

Description

Template tags that are broken over multiple lines are rendered as text by DTL:

{% tagname ...
%}  <-- uh, oh! closed on a different line

It's a source of many innocuous bugs. Is this something that could be detected and fixed by djade?

EmilStenstrom commented 1 week ago

This is patched to work across many projects and some libraries (including django-components), so I suggest not applying this to avoid errors either way.