Closed MrHinsh closed 1 month ago
Hi @MrHinsh
Preserving it, not that much (we'd need to save state in some way), but I did just merge https://github.com/cloudbase/powershell-yaml/pull/148 which gives you an option to use flow
style for lists. Would that do?
Flow is great except when the item is really long... It makes sense for short strings
Sadly there is no sane way to decide when to use flow and when to use block. And there is no simple way yo save the previous state of the yaml. Even if we do save the state, we would need to decide whether or not to invalidate it if an element is mutated before serializing back to yaml.
The only potential way I see for something like this is by using something like this:
And set a property on a field which indicates which style to use for that element and its children.
Discussions have been enabled.
Can we have some way to preserve the format of lists?
Original:
After deserialise, serialised:
I'm happy with the default being the latter, but if the original was in the former, I like to maintain it.
p.s. Any chanse of enableing Discussion so I dont have to create a n issue for something that may not be an issue.