Open HUD-Software opened 1 year ago
You need to set the ForceNoInline property on the package table itself.
It could be nice to not inline the table that is loaded not inlined
See the readme. We serialize data in a predictable fashion, and prioritise that over everything else. So it doesn't matter what format the input was in, it gets cleaned up to this standard format on reserialization.
Hopefully with TOML 1.1, or 2.0, whichever they call it, this gets more bearable, because inline tables will be able to have newlines within them.
@SamboyCoding I am also of the opinion that it should be possible to preserve the original formatting or at least instruct the serializer to emit the same format as the input. Being able to preserve comments if any is also useful.
Rationale is that sometimes config files need to be both deserializable / serializable by an application and human readable / editable. Dropping original formatting by the parser kills this dual use case.
Considering the following toml file:
After loading and saving it with the following code (tomlet 5.1.3):
The content of
result.toml
file is inlined:How can we get a non inlined string for a document that is loaded not inlined?