diff options
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r-- | lisp/progmodes/js.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 52ed19cc682..414b6eb2baf 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3493,7 +3493,7 @@ This function is intended for use in `after-change-functions'." :language 'javascript :feature 'constant '(((identifier) @font-lock-constant-face - (:match "^[A-Z_][A-Z_\\d]*$" @font-lock-constant-face)) + (:match "\\`[A-Z_][A-Z_\\d]*\\'" @font-lock-constant-face)) [(true) (false) (null)] @font-lock-constant-face) @@ -3612,7 +3612,7 @@ This function is intended for use in `after-change-functions'." :feature 'number '((number) @font-lock-number-face ((identifier) @font-lock-number-face - (:match "^\\(:?NaN\\|Infinity\\)$" @font-lock-number-face))) + (:match "\\`\\(:?NaN\\|Infinity\\)\\'" @font-lock-number-face))) :language 'javascript :feature 'operator |