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

Rendering of strings doesn't match toml-rs #287

Open
epage opened this issue Dec 31, 2021 · 0 comments
Open

Rendering of strings doesn't match toml-rs #287

epage opened this issue Dec 31, 2021 · 0 comments
Labels
A-output Area: Outputting TOML C-bug Category: Things not working as expected

Comments

@epage
Copy link
Member

epage commented Dec 31, 2021

While we intentionally chose to prefer " over ' when no escaping is needed (because this is most likely what users will do), we should probably use """ to avoid quoting " in strings.

We also need to look into our \t handling.

Compare

Note: This only impacts content we auto-generate formatting for. We still preserve a users formatting when roundtripping through the format-preserving API.

@epage epage added the C-bug Category: Things not working as expected label Dec 31, 2021
@epage epage added the A-output Area: Outputting TOML label Sep 23, 2022
epage added a commit to epage/toml_edit that referenced this issue Jan 19, 2023
This is the other main half of toml-rs#340.  Still have deprecations and tests left

Note that strings are rendered differently, see toml-rs#287

By extension this also finishes up toml-rs#396.

BREAKING CHANGES
- `impl Display for toml::Value` now renders as values, not documents, see instead `Table`
- `toml::ser::Serializer` only serializes documents, instead see `toml::ser::ValueSerializer`
- `toml::ser::tables_last` is removed, no longer needed
- `toml::ser::to_vec` is removed to mirror the loss of `from_slice`
- atm `toml::ser::to_string_pretty` just causes larger arrays to be indented
- `toml::ser::Error` is now opaque
- `toml::ser::Serializer::pretty_string` was removed
- `toml::ser::Serializer::pretty_string_literal` was removed
- `toml::ser::Serializer::pretty_array` was removed
- `toml::ser::Serializer::pretty_array_indent` was removed
- `toml::ser::Serializer::pretty_array_trailing_comma` was removed
- `toml::ser::Serializer` is now used used by value, rather than `&mut`

Fixes toml-rs#396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-output Area: Outputting TOML C-bug Category: Things not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant