Skip to content

Commit 4f79f5c

Browse files
committed
Merge branch 'st4126'
2 parents 04e8e57 + 969dd86 commit 4f79f5c

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

Syntaxes/Embeddings/TSX (for Astro).sublime-syntax

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,36 @@ contexts:
1414
# https://docs.astro.build/en/basics/astro-syntax/#multiple-elements
1515
- meta_include_prototype: false
1616
- meta_scope: meta.jsx.js
17-
- match: '<(?=\s*[/>{{identifier_start}}])'
17+
- match: <
1818
scope: punctuation.definition.tag.begin.js
19-
push: jsx-tag-attributes-top
19+
push: jsx-tag-begin
2020
- include: else-pop
2121

22+
jsx-tag-begin:
23+
# required until sublimehq/Packages/PR#4114
24+
- meta_include_prototype: false
25+
- meta_scope: meta.tag.js
26+
# note: type parameter modifiers indicate generic lambda
27+
- match: (?=(?:in|out|const){{identifier_break}})
28+
fail: arrow-function
29+
- match: /
30+
scope: punctuation.definition.tag.begin.js
31+
set:
32+
- jsx-expect-unmatched-tag-end
33+
- jsx-tag-name
34+
- match: (?=\S)
35+
set:
36+
- jsx-tag-attributes
37+
- tsx-tag-check
38+
- jsx-tag-name
39+
40+
jsx-expect-unmatched-tag-end:
41+
# required until sublimehq/Packages/PR#4114
42+
- meta_include_prototype: false
43+
- meta_scope: invalid.illegal.unmatched-tag.js
44+
- meta_content_scope: meta.tag.js
45+
- include: jsx-expect-tag-end
46+
2247
jsx-tag-attributes:
2348
- meta_prepend: true
2449
- include: HTML (Astro).sublime-syntax#astro-directives

0 commit comments

Comments
 (0)