SublimeText / TrailingSpaces

Highlight trailing spaces and delete them in a flash.
MIT License
897 stars 94 forks source link

Error trying to parse settings: Invalid Escape #108

Closed sanchezelton closed 4 years ago

sanchezelton commented 8 years ago

Tried using this as usersettings in ST3 Build 3114, running on Windows 7, to pick up all whitespace characters (including space, tab, line feed, form feed etc.) + control characters: "trailing_spaces_regexp": "[\c[A-Z]\s]+"

Also tried being satisfied with just all whitespace characters:

"trailing_spaces_regexp": "[\s]+"

However, neither of these work and ST3 reports the error given in the subject.

These are valid JS RegExp character classes and ought to work.

rchl commented 4 years ago

Since you are inside string in a JSON document, you need to escape twice - "\\s".