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

fix(ser): Make pretty actually pretty #286

Merged
merged 1 commit into from
Dec 31, 2021
Merged

fix(ser): Make pretty actually pretty #286

merged 1 commit into from
Dec 31, 2021

Conversation

epage
Copy link
Member

@epage epage commented Dec 31, 2021

This includes porting tests over from toml-rs to ensure we match their
behavior. We removed the non-pretty case and the customization since
those aren't as important for our use case (cargo) and we'll want to
iterate on what we want from the API.

Our "pretty" is different than toml-rs in that we prefer " for
strings that could be literals but don't need to be literals to avoid
escaping.

Note: there are some other discrepancies in our "pretty" string handling
that should be looked into, like switching to tripple quotes to avoid
escaping.

Fixes #192

This includes porting tests over from `toml-rs` to ensure we match their
behavior.  We removed the non-pretty case and the customization since
those aren't as important for our use case (cargo) and we'll want to
iterate on what we want from the API.

Our "pretty" is different than `toml-rs` in that we prefer `"` for
strings that could be literals but don't need to be literals to avoid
escaping.

Note: there are some other discrepancies in our "pretty" string handling
that should be looked into, like switching to tripple quotes to avoid
escaping.

Fixes toml-rs#192
@epage epage merged commit 2edf93b into toml-rs:master Dec 31, 2021
@epage epage deleted the pretty branch December 31, 2021 01:05
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.

easy::to_string_pretty doesn't produce pretty results
1 participant