This issue was brought up before (#1605) and I thought it was fixed with #1606 but it seems to still be a problem.
Normal switch statements highlight correctly.
switch (number) {
case 1:
break;
case 2:
break;
default:
}
Highlighting breaks when you add curly brackets.
switch(number) {
case 1: {
// ^ CORRECT: source.js meta.switch.js meta.block.js keyword.control.switch.js
break;
}
case 2: {
// ^ WRONG: source.js meta.switch.js meta.block.js variable.other.readwrite.js
break;
}
default:
// ^ WRONG: source.js meta.switch.js meta.block.js variable.other.readwrite.js
}
It's fixed on the master.
@bounc3-paradise-on-e you are correct, it's work with the latest from master, closing.
I'm still seeing this issue on build 3180. Am I out of date, or has this not been released yet? If not, is there any way to get this fix?
It's in master, but 3180 did not include syntax improvements. You can use the version from master by copying JavaScript.sublime-syntax from this repo into your Packages directory at Packages/JavaScript/JavaScript.sublime-syntax. Just remember to remove it when Sublime updates.
Alternatively, JS Custom includes the latest version from master and can be installed via Package Control.
Most helpful comment
It's fixed on the master.