Just updated from Twig 2.* to Twig 3.*
Most of my templates are wrapped in the {% autoescape %} ... {% endautoescape %} block
And some templates have {% spaceless %} ... {% endspaceless %} block inside.
In final it looks like this:
{% autoescape %}
...
{% spaceless %}
...
{% endspaceless %}
...
{% endautoescape %}
And now (after the update to 3.*) I get SyntaxException from Twig.
How should these block be rewritten/supported?
Why such construction is no longer supported by the Twig?
Fatal error: Uncaught Twig\Error\SyntaxError: Unexpected "spaceless" tag (expecting closing tag for the "autoescape" tag defined near line 2). in