Skip to content

Commit 1984a49

Browse files
committed
Fix zend_highlight functionality I broke
Magic consts are not supposed to be highlighted as keywords.
1 parent f719b9d commit 1984a49

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Zend/zend_highlight.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,15 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
104104
break;
105105
case T_OPEN_TAG:
106106
case T_OPEN_TAG_WITH_ECHO:
107-
next_color = syntax_highlighter_ini->highlight_default;
108-
break;
109107
case T_CLOSE_TAG:
108+
case T_LINE:
109+
case T_FILE:
110+
case T_DIR:
111+
case T_TRAIT_C:
112+
case T_METHOD_C:
113+
case T_FUNC_C:
114+
case T_NS_C:
115+
case T_CLASS_C:
110116
next_color = syntax_highlighter_ini->highlight_default;
111117
break;
112118
case '"':

0 commit comments

Comments
 (0)