Unnamed repository; edit this file 'description' to name the repository.
Fix python highlights to support single character and alphanumeric constant identifier (#6751)
Farzin 2023-04-14
parent 5ec4119 · commit bb27542
-rw-r--r--runtime/queries/python/highlights.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index 70b91efb..0c6a83c5 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -94,7 +94,7 @@
; Variables
((identifier) @constant
- (#match? @constant "^[A-Z_]{2,}$"))
+ (#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
((identifier) @type
(#match? @type "^[A-Z]"))