Open Andy-Solo opened 1 month ago
Hi @Andy-Solo thanks for opening a feature request.
I won't have time to work on this in the near future. I'll put an explanation for what I think needs to be done, for either my future self or someone else who might be able to pick it up.
Getting this to work might be non-trivial. I think this is the code that produces the comma for flow mapping nodes: https://github.com/braydonk/yaml/blob/10bcc859418b821726f51e2beb7406449cf0b4a2/emitterc.go#L712-L716
It's hard to tell by reading if that's the spot that matters here, but that's my best guess.
Somehow the parser would need to figure out that the current node is the final flow mapping value, and then optionally emit the comma depending on a yaml_emitter
config value. Might be nasty to get working, but perhaps someone other than me will be able to do something easier than what I'm suggesting.
( duplicate of #110 )
After formatting, the character "," (that is, a comma) appears at the very end before "}":
loop:
or