Skip to content

Schema Default unescaped double quotes #1097

@RedCMD

Description

@RedCMD

Describe the bug

YAML states if a string starts with a double quote, it then must end with one
If a schema default value starts with a double quote (and doesn't end with ending double quote)
an error is left after completion

Expected Behavior

Surround the string with single quotes and escape any existing single quotes
OR
Surround the string with double quotes and escape any existing double quotes
OR
use a block-scalar |

Current Behavior

notice the lines comment:, begin: and end: (under string:) are all reporting errors
Image

Steps to Reproduce

  1. assign schema https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json
  2. trigger the New Grammar completion
  3. 🐛Bug

Environment

  • Windows

the same should also apply to all other special YAML tokens
#comments etc
I would like the schema to be compatible with both YAML and JSON

PR redhat-developer/yaml-language-server#1040

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions