diff lisp/progmodes/js.el @ 112420:f7f90410cc52

* lisp/progmodes/js.el (js--regexp-literal): Count backslashes.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 21 Jan 2011 15:48:20 -0500
parents 376148b31b5e
children 9f7614f1a892
line wrap: on
line diff
--- a/lisp/progmodes/js.el	Fri Jan 21 13:12:32 2011 -0500
+++ b/lisp/progmodes/js.el	Fri Jan 21 15:48:20 2011 -0500
@@ -1654,7 +1654,7 @@
 ;; as the newline is escaped with \. Account for that in the regexp
 ;; below.
 (defconst js--regexp-literal
-  "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\/\\|[^/*]\\)\\(?:\\\\/\\|[^/]\\)*\\(/\\)"
+  "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\.\\|[^/*\\]\\)\\(?:\\\\.\\|[^/\\]\\)*\\(/\\)"
   "Regexp matching a JavaScript regular expression literal.
 Match groups 1 and 2 are the characters forming the beginning and
 end of the literal.")