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']]);