SalGnt/Sublime-VimL

Backslashes in single-quoted strings incorrectly escape the next character

roryokane opened this issue · 0 comments

Since GitHub currently uses this library through Linguist, you can see the problem right here:

let characters = ['\', '"', 'a']

Compare to these lines with working highlighting:

let characters = ['"', 'a']
let characters = ['\\', '"', 'a']

The plugin assumes that \ within a single-quoted string should escape the following character. But as Vim’s help explains:

This string is taken as it is. No backslashes are removed or have a special meaning. The only exception is that two quotes stand for one quote.

This can probably be fixed by editing the code for string_quoted_single.