diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f024d39..6d995a0 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1757,6 +1757,10 @@ js--looking-at-operator-p (and (js--re-search-backward "[?:{]\\|\\_" 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). (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)")) diff --git a/test/indent/js.js b/test/indent/js.js index b40d47b..806e949 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -69,6 +69,9 @@ a++ b += c +var re = /some value/ +str.match(re) + baz(`http://foo.bar/${tee}`) .qux();