mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Escape literal [ in regexp
Improves compatibility with strict ES5 regexp syntax
This commit is contained in:
@@ -946,7 +946,7 @@
|
||||
|
||||
HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g;
|
||||
|
||||
REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*])*)(\/)?/;
|
||||
REGEX = /^\/(?!\/)((?:[^\[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;
|
||||
|
||||
REGEX_FLAGS = /^\w*/;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user