From c56617abf5fca5b2ada4721fa89337fa5a469771 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 6 May 2026 10:55:39 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B08579=20-=20Update=20PHPDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/Application/TwigBase/Twig/Extension.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/Application/TwigBase/Twig/Extension.php b/sources/Application/TwigBase/Twig/Extension.php index 2c5ebeffae..18721f9af1 100644 --- a/sources/Application/TwigBase/Twig/Extension.php +++ b/sources/Application/TwigBase/Twig/Extension.php @@ -153,8 +153,12 @@ class Extension return twig_array_filter($oTwigEnv, $array, $arrow); }, ['needs_environment' => true]); - // @since 3.3.0 N°8579 - // Filter to remove spaces between HTML tags, overwrite the deprecated core "spaceless" filter + /** + * Filter to remove spaces between HTML tags, overwrite the deprecated core "spaceless" filter + * Usage in twig: {% apply spaceless %}some html{% endapply %} + * + * @since 3.2.3 3.3.0 N°8579 + */ $aFilters[] = new TwigFilter('spaceless', function (?string $content) { return trim(preg_replace('/>\s+<', $content ?? '')); }, ['is_safe' => ['html']]);