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

Add setting not to format 'yes', 'no' and other boolean-like strings

Open johanla0 opened this issue 2 years ago • 0 comments

As it is known,

"Yes" and "No" should be enclosed in quotes (single or double) or else they will be interpreted as TrueClass and FalseClass values. https://support.asg.com/mob/mvw/10_0/mv_ag/using_quotes_with_yaml_special_characters.htm

I've checked and yes, in Ruby we get true or false instead. https://makandracards.com/makandra/24809-yaml-keys-like-yes-or-no-evaluate-to-true-and-false

So let's add an option not to format (i.e. remove quotes) for these keys? Because if they are quoted, it's highly likely intentional.

y|Y|yes|Yes|YES|n|N|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF

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

johanla0 avatar May 25 '23 10:05 johanla0