Skip to content

Commit 6789773

Browse files
author
MattDMo
committed
Fix some unicode stuff
1 parent 00b12f0 commit 6789773

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

PythonImproved.YAML-tmLanguage

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ patterns:
142142
- include: $self
143143

144144
- name: meta.class.python
145-
begin: \s*(class)\s+(?=[\p{Alpha}_][\p{Alnum}_])
145+
begin: \s*(class)\s+(?=[\p{Alpha}_][\p{Alnum}_]*)
146146
beginCaptures:
147147
'1': {name: storage.type.class.python}
148148
end: (\()|\s*($\n?|#.*$\n?)
@@ -151,8 +151,8 @@ patterns:
151151
'2': {name: invalid.illegal.missing-inheritance.python}
152152
patterns:
153153
- contentName: entity.name.type.class.python
154-
begin: (?=[A-Za-z_][A-Za-z0-9_]*)
155-
end: (?![A-Za-z0-9_])
154+
begin: (?=[\p{Alpha}_][\p{Alnum}_]*)
155+
end: (?![\p{Alnum}_])
156156
patterns:
157157
- include: '#entity_name_function'
158158

@@ -166,7 +166,7 @@ patterns:
166166
patterns:
167167
- contentName: entity.name.function.python
168168
begin: (?=[\p{Alpha}_][\p{Alnum}_]*)
169-
end: (?![A-Za-z0-9_])
169+
end: (?![\p{Alnum}_])
170170
patterns:
171171
- include: '#entity_name_function'
172172
- contentName: meta.function.parameters.python
@@ -306,6 +306,7 @@ patterns:
306306

307307
- include: '#magic_variable_names'
308308

309+
# this needs to be here, or else cls() is a reg. function and self.foo is not highlighted
309310
- include: '#language_variables'
310311

311312
- include: '#generic_object_names'
@@ -372,7 +373,8 @@ patterns:
372373

373374
- include: '#line_continuation'
374375

375-
- include: '#language_variables'
376+
# not needed?
377+
# - include: '#language_variables'
376378

377379
- include: '#string_quoted_single'
378380

0 commit comments

Comments
 (0)