diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f024d397ffb..6d995a095e6 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1756,6 +1756,10 @@ This performs fontification according to `js--class-styles'." (save-excursion (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).