Open andresrodco opened 3 years ago
I think I found a fix.
We need to create a new region called jsDestructuringPropertyString
and include it in the contains attribute of the jsDestructuringBlock
region.
The new jsDestructuringPropertyString
should be:
syntax region jsDestructuringPropertyString contained matchgroup=jsObjectKeyString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial skipwhite skipempty nextgroup=jsObjectValue
I'll see if I can create a PR for that.
When any but the last destructuring key is surrounded by quotes, the error occurs:
When any but the last destructuring key is NOT surrounded by quotes, the highlight is ok:
I've managed to research a little bit the issue and this is what I found: