You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using vscode with the extension, the following happens:
However, if you add quotes around the object key in the YAML, the autocomplete dropdown works as expected as you can see in the following image:
I have also found the same issue arises when using other special characters at the start of the object key property name. This issue seems to be similar to the issue fixed here: #435
Maybe if an object key starts with any non-alphanumeric/special characters, it should be quoted be default? And also if the object key contains a : it should also be quoted.
Steps to Reproduce
Create a JSON schema using the schema from above
When using this schema with the vscode-yaml extension, use ctrl+space to have the dropdown auto complete option appear and select the item in the dropdown (in this example it is Test: Colon
See that when doing ctrl+space again under that object, it wont have the expected behavior where it has none as the selectable item in the dropdown.
If you then wrap the Test: Colon in quotes, and do ctrl+space again it will now have none as a selectable item in the typeahead.
Environment
Windows
[x ] Mac
Linux
other (please specify)
I originally created this issue in the vscode-yaml repo, but after coming back to it, it seems like it should actually be here.
The text was updated successfully, but these errors were encountered:
Describe the bug
If there is a colon in a property key name, it breaks the auto complete dropdown from working. For example, if i have the following schema:
when using vscode with the extension, the following happens:
However, if you add quotes around the object key in the YAML, the autocomplete dropdown works as expected as you can see in the following image:
I have also found the same issue arises when using other special characters at the start of the object key property name. This issue seems to be similar to the issue fixed here: #435
Maybe if an object key starts with any non-alphanumeric/special characters, it should be quoted be default? And also if the object key contains a
:
it should also be quoted.Steps to Reproduce
Test: Colon
none
as the selectable item in the dropdown.Test: Colon
in quotes, and do ctrl+space again it will now havenone
as a selectable item in the typeahead.Environment
I originally created this issue in the vscode-yaml repo, but after coming back to it, it seems like it should actually be here.
The text was updated successfully, but these errors were encountered: