Fix font lock regex for user defined constant in PHP
The old regex also captured functions with two or more uppercase characters. This new regex fixes that issue. * lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings): New regex that match only user-defined constants. (Bug#71593)
This commit is contained in:
parent
e1ba4ebb49
commit
a4fe4ca93c
1 changed files with 1 additions and 1 deletions
|
@ -774,7 +774,7 @@ characters of the current line."
|
|||
@font-lock-builtin-face))
|
||||
;; user defined constant
|
||||
((name) @font-lock-constant-face
|
||||
(:match "_?[A-Z][0-9A-Z_]+" @font-lock-constant-face))
|
||||
(:match "\\`_?[A-Z][0-9A-Z_]+\\'" @font-lock-constant-face))
|
||||
(const_declaration
|
||||
(const_element (name) @font-lock-constant-face))
|
||||
(relative_scope "self") @font-lock-builtin-face
|
||||
|
|
Loading…
Add table
Reference in a new issue