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

Add ability to choose null type

Open vytux-com opened this issue 10 months ago • 0 comments

I have a lot of documents which use the canonical null specification of ~ instead of the english null

Can we have an option to output either the original null type used or at least specify which type of null should we convert to

      - Description: Sample Rule
        IPAddress: 127.0.0.1
        OpenPorts: [80,443]
        RuleName: Sample
        ValidFrom: ~
        ValidTo: ~

gets converted to

      - Description: Sample Rule
        IPAddress: 127.0.0.1
        OpenPorts: [80,443]
        RuleName: Sample
        ValidFrom: null
        ValidTo: null

https://yaml.org/type/null.html

 ~ # (canonical)
|null|Null|NULL # (English)
| # (Empty)

vytux-com avatar Apr 23 '24 00:04 vytux-com