Skip to content

Provide means to trim return from <:sub ...> </:> #61

@jonathanstowe

Description

@jonathanstowe

I've just been caught out by the return of a <:sub> including the \n at the end of the line when formatted like:

<:sub form-name($target)>
   resyncForm_<$target.dc-id>_<$target.channel-id>
</:>

Obviously if one is using that as an attribute value (as I was,) then that won't have the outcome desired.

Clearly one could format the sub as:

<:sub form-name($target)>resyncForm_<$target.dc-id>_<$target.channel-id></:>

To lose the \n but that's less than lovely.

Perhaps there could an additional attribute to the <:sub> (and the similar things,) which could cause the leading and trailing whitespace to be trimmed from the return. It would be nicer if this were in the template itself rather than in the calling code as it may want to be on a case by case basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions