vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Inconsistent syntax highlighting

Open CanePlayz opened this issue 2 years ago • 3 comments

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

  • [x] Windows
  • [ ] Mac
  • [ ] Linux
  • [ ] other (please specify)

CanePlayz avatar Mar 13 '23 20:03 CanePlayz

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?

CanePlayz avatar Sep 16 '23 17:09 CanePlayz

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

RedCMD avatar Jun 07 '24 10:06 RedCMD

Ok thanks

CanePlayz avatar Jun 07 '24 17:06 CanePlayz