N°8579 - Update PHPDoc

This commit is contained in:
Molkobain
2026-05-06 10:55:39 +02:00
parent 7676115725
commit c56617abf5

View File

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