Commit 4887e7c6 authored by Dmitry Gutov's avatar Dmitry Gutov

js-mode: Fix indent problem after a regexp

* lisp/progmodes/js.el (js--looking-at-operator-p): Check that the
slash is not ending a regexp (bug#24854).
parent e992ac0a
......@@ -1756,6 +1756,10 @@ This performs fontification according to `js--class-styles'."
(save-excursion
(and (js--re-search-backward "[?:{]\\|\\_<case\\_>" nil t)
(eq (char-after) ??))))
(not (and
(eq (char-after) ?/)
(save-excursion
(eq (nth 3 (syntax-ppss)) ?/))))
(not (and
(eq (char-after) ?*)
;; Generator method (possibly using computed property).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment