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

Avoid breaking patches by removing trailing whitespaces #6

Merged
merged 1 commit into from Oct 9, 2016
Merged

Avoid breaking patches by removing trailing whitespaces #6

merged 1 commit into from Oct 9, 2016

Conversation

FlorianFranzen
Copy link
Contributor

The atom whitespaces package removes trailing whitespace by default.

This setting file makes sure, that trailing whitespace are never automatically deleted on save, to avoid breaking patches on save.

@miketheman
Copy link
Owner

Thanks! I haven't seen a good way to add a spec/test for this yet, and I realize the project doesn't have any specs either.
Do you have any ideas on how to test this config setting?

@FlorianFranzen
Copy link
Contributor Author

To test if trailing new lines are preserved in patch files I would open a file with multiple lines that have trailing space characters. I would then force Atom to save that fill and then check if the trailing new lines are still present in the file.

@miketheman miketheman merged commit 2274133 into miketheman:master Oct 9, 2016
@miketheman
Copy link
Owner

Thanks! I'll add specs for this and release.

miketheman added a commit that referenced this pull request Oct 10, 2016
To support the changes in #6, this spec suite performs an empty diff
file load, adds some text with trailing spaces, and saves it.

With the default settings for the package, it should never trim
whiespace if the whitespace package is enabled.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman
Copy link
Owner

Specs added and released in 0.6.0.

Thanks again!

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

Successfully merging this pull request may close these issues.

None yet

2 participants