You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The syntax highlighting of multi-line values containing colon characters doesn't look right. For example, consider the following YAML:
foo:
bar: | set_header 'Server: ' set_header 'Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS' set_header 'Access-Control-Allow-Origin: https://snip'
Here's how this gets highlighted:
Note that the first line of the multiline value gets 'key' colouring (blue) up to the colon, then the closing quote and start of next line get 'value" (brown) colouring until the next quote, then key again until the colon, then value...
If I remove the colons, everything in the multi-line value is correctly coloured brown.
I tried this in an online YAML parser and it treated the multi-line section as a single value, so I think this should be valid - the colons shouldn't be being handled as key-value separators.
VS Code version: Code 1.39.2 (6ab5985, 2019-10-15T15:35:18.241Z)
OS version: Windows_NT x64 10.0.18363
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 2904)
The trouble with closing this as an upstream issue is that the last comment in that upstream issue is them requesting help from the VS Code team: "Since @infininight has kindly explained the issue in a very detailed way, maybe someone familiar with VSCode would be willing to take a look at it :) It seems we're stuck without some help. Sorry for tagging you out of the blue @alexandrudima@bpasero, is there a chance you could take a quick look at this issue (or tag someone who could)? Would be very much appreciated!" So it sounds like Code is waiting for a fix from upstream, while upstream is appealing to Code to do the fix!
From what I understand from textmate/yaml.tmbundle#17 (comment), this is a limitation of using textmate. There's not much to be done about that other than maybe #77140 will help.
Issue Type: Bug
Note: This was originally reported on the Kubernetes extension at vscode-kubernetes-tools/vscode-kubernetes-tools#639, and traced upstream to the Red Hat YAML extension at redhat-developer/vscode-yaml#242, but it looks like it affects all YAML files even without those extensions being installed, and appears to be down to the VS Code built-in YAML highlighter at https://github.com/microsoft/vscode/blob/master/extensions/yaml/syntaxes/yaml.tmLanguage.json.
The syntax highlighting of multi-line values containing colon characters doesn't look right. For example, consider the following YAML:
Here's how this gets highlighted:
Note that the first line of the multiline value gets 'key' colouring (blue) up to the colon, then the closing quote and start of next line get 'value" (brown) colouring until the next quote, then key again until the colon, then value...
If I remove the colons, everything in the multi-line value is correctly coloured brown.
I tried this in an online YAML parser and it treated the multi-line section as a single value, so I think this should be valid - the colons shouldn't be being handled as key-value separators.
VS Code version: Code 1.39.2 (6ab5985, 2019-10-15T15:35:18.241Z)
OS version: Windows_NT x64 10.0.18363
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Extensions (10)
The text was updated successfully, but these errors were encountered: