strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

Problem loading document with a single string

Open aschankler opened this issue 2 years ago • 0 comments

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.

aschankler avatar Apr 17 '22 20:04 aschankler