Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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