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
Amp silently removes trailing spaces at end of line #217
Comments
"Overly opinionated" is kind of the tag line for amp. 😄 Trailing whitespace has always been an anti-pattern in my experience, and the surprise of unrelated changes can always be managed by using partial staging in git. Ensuring a trailing newline is a similar (and admittedly more common) behaviour. That said, I wouldn't be opposed to making this configurable. The behaviour for both of these is wrapped up in the save command. |
I believe #116 allows you to add |
@jmacdonald , editorconfig is nice to solve this issue. two trailing whitespaces in markdown are the same as |
Editing and then saving a file containing lines that end with a space character results in a file where some or all such trailing characters have been removed, even on lines that have not been edited. (I have not had time to explore this behavior in detail, so I do not know if all such lines are altered, if only spaces or other whitespace characters are altered, or if only visited lines are affected.)
If this is correct behavior rather than a bug, this seems overly opinionated — it's not too hard to imagine this behavior introducing difficult-to-diagnose bugs (given spaces are generally invisible).
The text was updated successfully, but these errors were encountered: