No way to modify a single `Node` to emit with `SingleQuoted`?
I've been beating my head into the wall to get this library to allow me to set a single YAML::Value to YAML::SingleQuoted. This is a pretty straightforward problem that I think most people can guess at: I'm editing a docker-compose.yml file and I'm losing every quote literal.
I know I can use YAML::Emitter and << into it with YAML::SingleQuoted to emit the entire document, but keys and values single quoted, but that isn't what I need. I realize quotes aren't the standard here in YAML format. But is there any way to read and preserve them?
same request here.
If you're emitting it piecemeal, then you can just prepend YAML::SingleQuoted right before the node you want single-quoted. But if you've got a large node where you only want a small piece of it single-quoted and you're emitting all at once, there's no way to do this.
I agree it would be nice. Probably the right way to do it is to attach some emitter metadata to each node, and (ideally) have an option on the parser to preserve that metadata when parsing. Open to PRs, but probably this would be a big change.