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

Problem loading document with a single string #182

Open
aschankler opened this issue Apr 17, 2022 · 0 comments
Open

Problem loading document with a single string #182

aschankler opened this issue Apr 17, 2022 · 0 comments

Comments

@aschankler
Copy link

Using version 1.6.1:

>>> doc = strictyaml.as_document("foo")
>>> doc
YAML(foo)
>>> doc.as_yaml()
'foo\n...\n'
>>> round_trip = strictyaml.load(doc.as_yaml())
>>> round_trip
YAML(foo

)
>>> round_trip.data
'foo\n...\n'

This change during the round-trip is present if using a schema too. It seems to me like as_document should at least warn of this behavior.

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

No branches or pull requests

1 participant