tamzinblake / js3-mode

A chimeric fork of js2-mode and js-mode
GNU General Public License v3.0
181 stars 13 forks source link

Preventing splitting string after backslash. #79

Closed katyo closed 11 years ago

katyo commented 11 years ago

I fixed the behavior of splitting string. Now when we press Enter key, if we're after a backslash, creating new string will be prevented, so we obtain backslash-newline-separated (\ \n in c-style) string.

So, when we typed something like this: "some\str" … and hit RET after \ char, we obtain: "some\ str" … instead of default behavior: "some\"

Of course, my fix is safe. So, using backslashes for escaping is covered. Even you typed something like: "some\str" … and hit RET after second slash, you will have "some\"

katyo commented 11 years ago

Oh, excuse me, I edited wrong file :-\