Remove usage of spaceless tag in Twig templates

Created on 16 November 2019, about 5 years ago
Updated 4 November 2023, about 1 year ago

Problem/Motivation

spaceless tag has been removed in Twig 3. It is not used in Drupal 9 anymore.

Proposed resolution

Use spaceless filter instead in Drupal 8 too to help new sites become compatible with Twig 3 / Drupal 10.
https://twig.symfony.com/doc/3.x/filters/spaceless.html

Before:

{% spaceless %}

{% endspaceless %}

After:

{% apply spaceless %}

{% endapply %}

Remaining tasks

Create a patch.

User interface changes

None.

📌 Task
Status

Closed: outdated

Version

9.5

Component
Theme 

Last updated 5 days ago

Created by

🇷🇺Russia Chi

Live updates comments and jobs are added and updated live.
  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024