ruyaml icon indicating copy to clipboard operation
ruyaml copied to clipboard

Dev

Open guibog opened this issue 11 months ago • 4 comments

guibog avatar Feb 29 '24 03:02 guibog

Label error. Requires exactly 1 of: bug, enhancement, major, minor, patch, skip-changelog. Found:

github-actions[bot] avatar Feb 29 '24 03:02 github-actions[bot]

I don't see a change that documents this new setting.

smurfix avatar Feb 29 '24 06:02 smurfix

I don't see a change that documents this new setting.

Aw sorry I did not intend to send a real PR, just try some things, will switch to draft.

guibog avatar Feb 29 '24 07:02 guibog

@smurfix I'm trying to build a command line yaml editor using jq/yq syntax, but it has to be able to edit complex yaml files in a very stable way, i.e. even better than the current round trip functionality.

For now I had two unstability issues

One with "- True" becoming "- true", this can be patched easily with add_constructor and add_representer for booleans.

Another with inconsistent indents for block sequences, for example this is a "valid" yaml:

a:
   - a1
   - a2
b:
- b1
- b2

But apparently it cannot be stabilized in a round trip call without storing the local indent somewhere, which I try in this PR, using SequenceStartEvent.

guibog avatar Feb 29 '24 07:02 guibog