vscode-yaml-sort icon indicating copy to clipboard operation
vscode-yaml-sort copied to clipboard

yaml sort executes all blocks and merges making DRY inpossible

Open reneweteling opened this issue 2 years ago • 1 comments

on sort, all merge blocks are executed: https://yaml.org/type/merge.html

Before sort

nl:
  default: &default
    somekey: is a value
  generic:
    <<: *default
    some_other_key: also a value

After sort

---
nl:
  default:
    somekey: is a value
  generic:
    some_other_key: also a valu
    somekey: is a value

So the block is gone, and the values are being inserted, this makes the yml sort unusable in big dry yml files.

reneweteling avatar Jun 28 '22 07:06 reneweteling

Just faced the same problem. It would be so helpful to still be able to use this extension when the aliases are included. Any updates on this issue?

pilgunboris avatar Mar 26 '23 16:03 pilgunboris