wookiehangover/jshint.vim — pull request #28 by eventualbuddha (2013-12-17 22:54:33+00:00)
Title: Fix reading jshintrc files with comments in them.

This was failing with the [jshintrc file from the charlatan library](https://github.com/nodeca/charlatan/blob/3a838a7fb16605ca358b0baa4c31a5bda293cd9e/.jshintrc). Backreferences do not seem to work in character classes, so we can't collapse single and double quotes into a single test. This commit splits them out to work separately.

```js
> /(a)[^\1]/.test('aa')
true
> /(a)[^\1]/.test('ab')
true
> /(a)[^\1]/.test('a\u0001')
false
```

In the above example the first line should have returned false if backreferences worked in character classes, but it did not. The second example works as you'd think, but for the wrong reason. The third example shows what's really going on. Rather than being treated as a backreference, `\1` is being interpreted as the character code 1.