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

Cleanup #65

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Cleanup #65

merged 2 commits into from
Dec 7, 2023

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Dec 7, 2023

In #29, I failed to do a proper manual test before merging. This fixes the biggest problems things from that PR. Arrays (of strings) seem to still be re-formatted from multiline to single-line, I hope that's a bug here and not in toml_edit, so it can easily be fixed before the next release.

@jplatte jplatte merged commit 6aea9b6 into main Dec 7, 2023
4 checks passed
@jplatte jplatte deleted the jplatte/cleanup branch December 7, 2023 17:26
@DevinR528
Copy link
Owner

I hate to say it, but I'm pretty sure it's a toml_edit choice. When they format an Array they always revert to default "decor" https://github.com/toml-rs/toml/blob/main/crates/toml_edit/src/array.rs#L443

I vaguely remember this was one of the things that slowed me WAY down working on this. There isn't really a good answer. When do we add newlines when seeing any suffix decor with a newline? Does adding a line length option make sense (thinking about tracking line length is when I took a break on cargo sort haha) it would make the decision of newlines or not.

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.

2 participants