redhat-developer / redhat-developer/vscode-yaml

Schema Default unescaped double quotes

Open
#1,097 0 comments 0 reactions 1 assignee View on GitHub

@msivasubramaniaan is already working on this.

Since Mar 5, 2025.

Dominant language
TypeScript
Stars
830
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

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 https://github.com/redhat-developer/yaml-language-server/pull/1040

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.