jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
50 stars 4 forks source link

`while` loop in `case` block syntax highlighting is broken #94

Open rrama opened 2 weeks ago

rrama commented 2 weeks ago

The code with a problem is:

case "${char}" in
  '"')
    while [[ ( 0 -eq 1 ) ]] || ! something; do
      something_else
    done
    ;;
esac

It looks like:

Broken syntax highlighting I am using the Dark Modern theme. Observational note: In another similar example in my code, when I remove the redundant circular brackets the issue becomes less bad.

It should look like:

Correct when an if As you can see, when we swap the while for an if it works as expected.

Tested with

v1.8.7