sanity-io / vscode-sanity

Visual Studio Code extension for developing applications powered by Sanity.io
MIT License
51 stars 8 forks source link

Valid pipe operator flagged as illegal in VSCode syntax highlighting #23

Open matt-koevort opened 3 months ago

matt-koevort commented 3 months ago

Describe the bug

When piping an array in a projection to the order function, syntax highlighting suggests there is an error. On inspecting that error, it seems as if the pipe is not expected.

To Reproduce

Pipe an array in a projection to the order function, e.g. as seen below

*[] {
  "key1": {
    "key2": arr[] | order(type)
  }
}

Expected behavior

There should be no error

Screenshots

image

Which versions of Sanity are you using?

N/A

What operating system are you using?

macOS Sonoma 14.4.1

Additional context

N/A

Security issue?

N/A

runeb commented 2 months ago

We recently upgraded this plugin with a newer version of groq parsing. Could you verify if this fixed your issue @matt-koevort ?

https://github.com/sanity-io/vscode-sanity/pull/24