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

Enforcing newlines in template files results in unwanted Nodes #3440

Merged
merged 1 commit into from Mar 18, 2015

Conversation

jclem
Copy link
Contributor

@jclem jclem commented Mar 6, 2015

The default .editorconfig of Ember CLI tells an editor to append new lines to the end of files on write. This can cause surprising behavior when I do not see a new line at the end of my template file, but my rendered component has an extra Text node containing a new line at the end of it.

Appending a newline seems fine for any file that's not a template file, but it can be problematic when applied to templates.

@lukemelia
Copy link
Contributor

Maybe we should strip trailing whitespace in template compilation?

@jclem
Copy link
Contributor Author

jclem commented Mar 6, 2015

@lukemelia That could break cases where a component's white-space is pre. If I put newlines in the template, keep them, but we should not have the editor append one just to make Unix happy.

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

3 participants