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

Add support for stripping whitespace #324

Merged

Conversation

nathan-muir
Copy link
Contributor

@nathan-muir nathan-muir commented Mar 22, 2021

(After #321 changes are merged into release-2.4)

Other HTML templating languages automatically strip whitespace that includes newlines, eg:

<div>
    <span>A</span> <span>B</span>
</div>

Would be converted to

<div><span>A</span> <span>B</span></span>

This PR does something similar, controlled via an extra template attribute, <template name="..." whitespace="strip">...</template>.

Whitespace between two elements that does not contain a newline, is left untouched:

<div><span>test</span>        <span>space</span></div>

@filipenevola filipenevola merged commit f89a52d into meteor:release-2.4 Mar 22, 2021
@nathan-muir nathan-muir mentioned this pull request Mar 23, 2021
@filipenevola filipenevola added this to the 2.4 milestone Mar 24, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants