Fix merge anchor exploding

- Allow inline maps instead of just aliases
- Allow aliased sequences
- Disallow other types
- Use tag `!!merge` instead of key `<<`
- Fix insertion index for sequence merge

Closes #2386
This commit is contained in:
Steven WdV
2025-06-16 09:58:26 +02:00
parent c3782799c5
commit bfcb3fc6b7
3 changed files with 78 additions and 34 deletions
@@ -92,8 +92,8 @@ yq '.[4] | explode(.)' sample.yml
will output
```yaml
r: 10
x: 1
y: 2
x: 1
```
## Get anchor
@@ -293,8 +293,8 @@ bar:
foobarList:
b: bar_b
thing: foo_thing
c: foobarList_c
a: foo_a
c: foobarList_c
foobar:
c: foo_c
a: foo_a