Skip to content

Whitespace control when using twig components? #2228

Open
@nicolas-grekas

Description

@nicolas-grekas

I'm using a twig component like:

<twig:Turbo:Stream:Append target="#some-id">
    <div>Append this</div>
</twig:Turbo:Stream:Append>

But the whitespace around the div is noise (but still nice for formatting).
Is there a way to ask twig to remove it?
Using the non-HTML-like syntax, I can by using -%} / {%-, but what about the html-like syntax?
Is there some twig:trim="before/after/true/both" that I could use for that? Or that could be added if that looks like a good idea?

<twig:Turbo:Stream:Append target="#some-id" twig:trim="true">
    <div>Append this</div>
</twig:Turbo:Stream:Append>

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)Stalled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions