strictyaml
strictyaml copied to clipboard
Problem loading document with a single string
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.