From 12075c0f958adc67caf41c083c68057ada2c7a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 4 Jul 2023 15:29:54 +0200 Subject: [PATCH] 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. --- .../resources/template/html/body/menu/content-menu.html.twig | 4 ++-- .../guides/resources/template/html/body/menu/menu.html.twig | 4 ++-- .../resources/template/tex/guides/body/paragraph.tex.twig | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/guides/resources/template/html/body/menu/content-menu.html.twig b/packages/guides/resources/template/html/body/menu/content-menu.html.twig index bda0e4e9b..fba2c51f9 100644 --- a/packages/guides/resources/template/html/body/menu/content-menu.html.twig +++ b/packages/guides/resources/template/html/body/menu/content-menu.html.twig @@ -1,5 +1,5 @@ -{% spaceless %} +{% apply spaceless %}
{% include "body/menu/menu-level.html.twig" %}
-{% endspaceless %} +{% endapply %} diff --git a/packages/guides/resources/template/html/body/menu/menu.html.twig b/packages/guides/resources/template/html/body/menu/menu.html.twig index ba89a8e14..a82ce7517 100644 --- a/packages/guides/resources/template/html/body/menu/menu.html.twig +++ b/packages/guides/resources/template/html/body/menu/menu.html.twig @@ -1,5 +1,5 @@ -{% spaceless %} +{% apply spaceless %} -{% endspaceless %} +{% endapply %} diff --git a/packages/guides/resources/template/tex/guides/body/paragraph.tex.twig b/packages/guides/resources/template/tex/guides/body/paragraph.tex.twig index fcdb3cb5c..41bdff709 100644 --- a/packages/guides/resources/template/tex/guides/body/paragraph.tex.twig +++ b/packages/guides/resources/template/tex/guides/body/paragraph.tex.twig @@ -1,8 +1,8 @@ -{% spaceless %} +{% apply spaceless %} {% set text = renderNode(node.value) %} {% if text|trim %} {{ text|raw }} {% endif %} -{% endspaceless %} +{% endapply %}