Incorrect bash/zsh syntax highlighting #147673
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
grammar
Syntax highlighting grammar
upstream
Issue identified as 'upstream' component related (exists outside of VS Code)
Issue Type: Bug
Vscode gets confused by the following fragment of zsh code (where the first line is taken verbatim from the
_arguments
completion helper code that is bundled with zsh):The second line (and everything after in the file) is incorrectly considered part of the string by VSCode's shell syntax highlighting. For some to me unfathomable reason it appears VSCode does not properly detect the end quote of the string on the first line.
Here is how it looks in vscode:
Removing the last ] in the string "fixes" the highlighting (but of course breaks the code):
VS Code version: Code 1.66.2 (dfd34e8, 2022-04-11T07:49:24.808Z)
OS version: Linux x64 5.17.3-arch1-1
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: