-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Incorrect inline snapshot indentation with hard_tabs = true
#679
Comments
Thanks for the issue. Are you referring to the content of the string? Isn't that the debug output of the vec, without any connection to formatting rust code? Very possibly I'm misunderstanding... |
Sorry for not being clear. When insta writes inline snapshots, it determines the indentation of the |
Ah sorry for indeed misunderstanding. The root of this is here: Lines 632 to 649 in ce0027a
We're counting whitespaces. We could instead do one of:
I don't think this is a personal priority for me nor a foundational feature for insta, so I won't get to it. But I'd be very happy to take a PR... |
We should correctly use a string here since someone could mix tabs and spaces and we would want to emit a tab when a tab is used. |
What happened?
I am using rustfmt configured with
hard_tabs = true
. When insta writes inline snapshots, it writes one space character for each tab.Reproduction steps
Insta Version
1.41
rustc Version
1.82.0
What did you expect?
I expected the indentation to use the tab character, not the space character.
The text was updated successfully, but these errors were encountered: