-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to keep quotes #200
Comments
Yeah, I agree this is my only annoyance. This breaks my Ansible playbooks since some values need to be quoted, for example when you have a leading "{{". |
@pascalre Is this project dead because you don't seem to react to issues? |
Hello @Joris29, this project is not dead. But my time is limited. Feel free to contribute with a PR. |
@pascalre Alright understandable I will try to do an attempt to create a PR for it but i have no knowledge of typescript but I guess I can learn it pretty fast |
This is a reoccurrence of #142 which is partially resolved it's strange behaviour with quoting. Using just single quotes or double quotes will change to nothing. Very strange quoting behaviour but i will try to fix it |
After doing some further research there is also another vscode extension for yaml validation which support sorting https://github.com/redhat-developer/yaml-language-server @paulcalabro If you don't use the custom sorts it might be better to use that one for now. As the code is quite complex for me and it might take a while to have a working solution. |
Seems like a lot of refactoring because the used library doesn't support it: nodeca/js-yaml#711 (comment) |
Thanks @Joris29 ! |
Could you add an option to just keep quotes as they are when sorting.
Example.
parent_key:
'Pkey2 with space':
k1: v1
k2: 'v2'
'Pkey1 with space':
k1: 'v1'
k2: v2
Would become:
parent_key:
Pkey1 with space:
k1: v1
k2: v2
Pkey2 with space:
k1: v1
k2: v2
What it should be if original quotes are ignored:
parent_key:
'Pkey1 with space':
k1: v1
k2: 'v2'
'Pkey2 with space':
k1: 'v1'
k2: v2
The text was updated successfully, but these errors were encountered: