I am using django templating, and for readability I have html that looks similar to the following:
{% if some_variable %}
text
{% else %}
nothing exists here
{% endif %}
{% for item in set %}
{% if forloop.first %}
...etc...
It converts to the following html at runtime, which includes tons of whitespace and returns:
text
<div>
<li
class='some_class
>
some text
</li>
</div>
etc...
Some pages even run to ~3,000 lines of html when viewing the page source.
Is there a tool to compress this html at runtime? What about a tool to remove extra line breaks?