Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

Consider using a snapshot format that supports multiline strings #15

Open
jacobgardner opened this issue Dec 9, 2018 · 1 comment
Open

Comments

@jacobgardner
Copy link
Contributor

JSON ends up turning line breaks into \ns which makes multiline snapshots very hard to diff for code reviews/pull requests or if you're using your diff tool instead of cargo snapshot.

I'm not a particularly big fan of YAML, but it does support multiline strings and there is a serde crate for yaml serialization.

@jacobgardner
Copy link
Contributor Author

Doesn't look like the yaml-rust crate currently supports multiline strings, but the hjson crate does.

image

Requires a downgrade of serde, but since serialization to snapshots is all we're using serde for right now, shouldn't be a big deal. I'll make a PR for your consideration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant