Plugin based on https://github.com/nochso/html-compress-twig
Currently supported Twig features are:
Tag {% htmlcompress %} ... {% endhtmlcompress %}
Function {{ htmlcompress('some html') }}
Filter {{ content|markdown|htmlcompress }}
Install plugin and then use it in your templates:
{% htmlcompress %}{% endhtmlcompress %}
{{ htmlcompress('<ul> <li>') }}
{{ '<ul> <li>'|htmlcompress }}