@@ -28,36 +28,21 @@ repository:
28
28
patterns :
29
29
- include : ' #jsx-tag-without-attributes-in-expression'
30
30
- include : ' #jsx-tag-in-expression'
31
- - include : ' #jsx-fragment'
32
31
33
32
# jsx tags
34
- jsx-fragment :
35
- name : meta.tag.fragment.tsx
36
- begin : (<)\s*(>)
37
- end : (</)\s*(>)
38
- beginCaptures :
39
- ' 1 ' : {name: punctuation.definition.tag.begin.tsx}
40
- ' 2 ' : {name: punctuation.definition.tag.end.tsx}
41
- endCaptures :
42
- ' 1 ' : {name: punctuation.definition.tag.begin.tsx}
43
- ' 2 ' : {name: punctuation.definition.tag.end.tsx}
44
- contentName : meta.jsx.children.tsx
45
- patterns :
46
- - include : ' #jsx-children'
47
-
48
33
jsx-tag-without-attributes-in-expression :
49
34
begin : |-
50
35
(?x)
51
36
(?<=[({\[,?=>:*]|&&|\|\||\?|\Wreturn|^return|\Wdefault|^)\s*
52
- (?=(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))\s*(>))
53
- end : (?!\s*(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))\s*(>))
37
+ (?=(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))? \s*(>))
38
+ end : (?!\s*(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))? \s*(>))
54
39
patterns :
55
40
- include : ' #jsx-tag-without-attributes'
56
41
57
42
jsx-tag-without-attributes :
58
43
name : meta.tag.without-attributes.tsx
59
- begin : (<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))\s*(>)
60
- end : (</)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))\s*(>)
44
+ begin : (<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))? \s*(>)
45
+ end : (</)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?<!\.|-))? \s*(>)
61
46
beginCaptures :
62
47
' 1 ' : {name: punctuation.definition.tag.begin.tsx}
63
48
' 2 ' : {name: entity.name.tag.tsx}
@@ -147,7 +132,6 @@ repository:
147
132
patterns :
148
133
- include : ' #jsx-tag-without-attributes'
149
134
- include : ' #jsx-child-tag'
150
- - include : ' #jsx-fragment'
151
135
- include : ' #jsx-evaluated-code'
152
136
- include : ' #jsx-entities'
153
137
0 commit comments