pangloss/vim-javascript — pull request #214 by davidchambers (2014-10-10 15:16:03+00:00)
Title: regexp: prevent ")" inside character class from terminating group

Commit message:

> /([)])/ is currently not handled correctly: the first ")" mistakenly
> terminates the jsRegexpGroup and consequently the jsRegexpCharClass,
> since the former contains the latter.
>
> This commit adds a skip pattern to prevent a ")" character inside a
> character class from terminating a jsRegexpGroup.

This pattern requires some explanation:

```vim
skip="\\.\|\[\(\\.\|[^]]\)*\]"
```

I just realized this is identical to the skip pattern added in #160! This gives me confidence in the change, and saves me from reproducing the explanation.

I first tried enhancing the skip pattern of the `jsRegexpCharClass`, but it seems a contained region cannot skip the containing region's closing delimiter.