Skip to content

Commit 12075c0

Browse files
committed
Address deprecation of spaceless tag
Since Twig 2.7, the spaceless tag is deprecated in favor of the spaceless filter, or the apply tag with a spaceless argument. I picked the latter so as to still benefit from syntax highlighting.
1 parent 86aa1e7 commit 12075c0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% spaceless %}
1+
{% apply spaceless %}
22
<div class="contents">
33
{% include "body/menu/menu-level.html.twig" %}
44
</div>
5-
{% endspaceless %}
5+
{% endapply %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% spaceless %}
1+
{% apply spaceless %}
22
<div class="menu">
33
{% include "body/menu/menu-level.html.twig" %}
44
</div>
5-
{% endspaceless %}
5+
{% endapply %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{% spaceless %}
1+
{% apply spaceless %}
22
{% set text = renderNode(node.value) %}
33

44
{% if text|trim %}
55
{{ text|raw }}
66

77
{% endif %}
8-
{% endspaceless %}
8+
{% endapply %}

0 commit comments

Comments
 (0)