Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonathanstowe opened this issue Nov 29, 2021 · 0 comments
Open

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

jonathanstowe opened this issue Nov 29, 2021 · 0 comments

Comments

@jonathanstowe
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant