Skip to content

Commit

Permalink
Merge branch 'st4126'
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Jan 4, 2025
2 parents 04e8e57 + 969dd86 commit 4f79f5c
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions Syntaxes/Embeddings/TSX (for Astro).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,36 @@ contexts:
# https://docs.astro.build/en/basics/astro-syntax/#multiple-elements
- meta_include_prototype: false
- meta_scope: meta.jsx.js
- match: '<(?=\s*[/>{{identifier_start}}])'
- match: <
scope: punctuation.definition.tag.begin.js
push: jsx-tag-attributes-top
push: jsx-tag-begin
- include: else-pop

jsx-tag-begin:
# required until sublimehq/Packages/PR#4114
- meta_include_prototype: false
- meta_scope: meta.tag.js
# note: type parameter modifiers indicate generic lambda
- match: (?=(?:in|out|const){{identifier_break}})
fail: arrow-function
- match: /
scope: punctuation.definition.tag.begin.js
set:
- jsx-expect-unmatched-tag-end
- jsx-tag-name
- match: (?=\S)
set:
- jsx-tag-attributes
- tsx-tag-check
- jsx-tag-name

jsx-expect-unmatched-tag-end:
# required until sublimehq/Packages/PR#4114
- meta_include_prototype: false
- meta_scope: invalid.illegal.unmatched-tag.js
- meta_content_scope: meta.tag.js
- include: jsx-expect-tag-end

jsx-tag-attributes:
- meta_prepend: true
- include: HTML (Astro).sublime-syntax#astro-directives

0 comments on commit 4f79f5c

Please sign in to comment.