Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.99
- OS Version: Windows 11
Steps to Reproduce:
This relates to the integration of schema descriptions via popup when hovering over json elements. Tested on Windows.
Create as simple json schema
schema.json:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "schema",
"type": "object",
"properties": {
"someProp": {
"type": "object",
"description": "Here I need to escape dollar-sign: \\$(abc)"
},
"someOtherProp": {
"type": "object",
"description": "Here I don't need to escape dollar-sign: $(ab:c)"
}
}
}
Include this schema in a json file:
{
"$schema": "schema.json",
"someOtherProp": {},
"someProp": {}
}
Open the json file with vscode and hover over the properties. The description can be seen. If the escaping backslashes for $(abc)
are removed in schema.json, the content is not displayed correctly. If escaping backslashes are added to $(ab:c)
, a backslash can be seen in the description popup.
Expected behavior:
According to JSON RFC, there should be no need to escape the dollar sign. If this is for some reason not possible, the behavior should be at least consistent. (i.e. dollar sign must be always escaped.)