yglu
yglu copied to clipboard
Mixing of !for based loops and usual sequences breaks order
When I do:
seq: !-
- first
- second
after_seq: !-
- pre-last
- last
extended_seq:
- !for .seq: !()
- !? $
- next
- other next
- !for .after_seq: !()
- !? $
I expect the next output:
extended_seq:
- first
- second
- next
- other next
- pre-last
- last
But I get:
extended_seq:
- next
- other next
- first
- second
- pre-last
- last
I'm willing to fix this but it's difficult to find the time these days. As a workaround, you can create another for/sequence for the intermediate items:
seq: !-
- first
- second
nexts: !-
- next
- other next
after_seq: !-
- pre-last
- last
extended_seq:
- !for .seq: !()
- !? $
- !for .nexts: !()
- !? $
- !for .after_seq: !()
- !? $