Closed EJahren closed 2 years ago
Closing this as I just realized this probably goes under the general warning stated in the README.
Yeah, this module is indeed an old bag of hacks to optimistically avoid escaping and dump things more plainly, which has a lot of cases like this for complicated inputs. Some of these issues might be easy to avoid and add a special-case for, but here I think it's relatively rare and complicated special-case, with fix being to check string via unicodedata to pick quoting style - probably not worth bothering with. Definitely don't use this module for serializing that kind of unreadable stuff.
For escaped input such as
which PYYaml does parse.
pretty-yaml produces unescaped output, ie.:
which PYYaml does not parse.