Closed badicsalex closed 2 years ago
Could you give an example of a document where serializing with width=-1 makes a difference? It's possible that should just be default for all serializers.
My preferred format: https://github.com/badicsalex/hun_law_rs/blob/master/tests/datatests/data_convert_block_amendments/complex_1.yml#L38
This is how that part serializes since 0.9:
- identifier: '13'
children:
- identifier: '1'
body: A nukleáris létesítménnyel összefüggő hatósági engedélyezési
eljárás során biztosítani kell a szakértőként eljáró személyek
vagy szervezetek függetlenségét. Az egyes eljárásokban kirendelt,
...
There are no line breaks in my long strings.
width=-1 could be the default for sure, since that's how it worked up until 0.8 and I didn't see any complaints.
It seems like a taste thing though, because the line-broken version is generally easier to read, while in my case I usually don't care much about the actual content and gladly let it fall off the right side of the screen. Not line-breaking the strings also makes diffs cleaner.
Thanks for the very quick fix :)
I'd like to alter the formatting of my yml output files, most importantly the width of the output.
I think this could be done by exposing yaml_emitter_set_width from the Emitter, and then on the Serializer structure, so that I could do something like:
Would you accept a PR implementing something like this?