SublimeText / CoffeeScript

Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.
440 stars 64 forks source link

Syntax Highlighting with Regex Literals #165

Closed seep closed 10 years ago

seep commented 10 years ago

I found an odd edge case with a regex literal.

string.replace /\\/g, "/"

The syntax highlighter treats /\\/g, "/ as the regex literal, and the closing quote as an opening quote. However, it compiles as expected:

string.replace(/\\/g, "/");