redhat-developer / vscode-yaml

YAML support for VS Code with built-in kubernetes syntax support
MIT License
670 stars 224 forks source link

Inconsistent syntax highlighting #901

Open CanePlayz opened 1 year ago

CanePlayz commented 1 year ago

Describe the bug

I've been using the winget schema (https://raw.githubusercontent.com/microsoft/winget-cli/master/schemas/JSON/manifests/v1.4.0/manifest.defaultLocale.1.4.0.json) to create some package manifests, when I noticed inconsistent highlighting. Both of the numbers here are specified as strings in the schema, however, only one gets highlighting.

image

Expected Behavior

Syntax highlighting in both or no cases

Current Behavior

Syntax highlighting in only one case

Steps to Reproduce

  1. Create a yaml file with the aforementioned schema
  2. Put numbers where strings belong

Environment

CanePlayz commented 1 year ago

I noticed what's causing the different behavior. It's the amount of periods in the attribute, 2 or more never get syntax highlighting. Perhaps because one period could be interpreted as a float, is this intended behavior?

RedCMD commented 6 months ago

1.4.0 is defined as type string in YAML 1.2 the syntax highlighter is outdated; hasn't been updated in 6 years

CanePlayz commented 6 months ago

Ok thanks