Is there a way to use Twig's {% spaceless %}
tag only under certain conditions?
For example, say you wanted the HTML to be spaceless in the live environment but wanted it uncompressed in the dev environment. I tried something like:
{% if isDev %}
{% spaceless %}
{% endif %}
{# Some code... #}
{% if isDev %}
{% endspaceless %}
{% endif %}
But this just throws a Twig error.