-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Trailing whitespace in testcases is ignored for diffs #384
Comments
That's unfortunately a limitation. I think one way to work with this would be to have users that need whitespace handling to add markers around it that make this more explicit. |
Why is it a Limitation if you don’t mind me asking? |
@TheNeikos it's a natural effect of how the indentation clean up system functions. |
Hm, since the newlines in this case are trailing, why would indentation (which usually comes before non-whitespace characters) interact with those? |
The code that cleans up indentation cannot disambiguate these cases. |
This is a bug in insta: mitsuhiko/insta#384
What happened?
I created test snapshots with excessive newlines. This was then corrected later, but there was no error or reported diff due to the now missing newlines at the end.
Reproduction steps
Insta Version
1.29
rustc Version
1.70
What did you expect?
I expected newlines changes to be reported, as this is for a CLI application, the trailing whitespaces are important.
The text was updated successfully, but these errors were encountered: