Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,21 +431,19 @@ repository:
tags-start-attributes:
begin: \G
end: (?=/?>)
endCaptures: { 0: { name: punctuation.definition.tag.end.svelte } }
name: meta.tag.start.svelte
patterns: [ include: '#attributes' ]

# Same as tags-start-attributes but slightly adjusted for special script/style/template tags.
tags-lang-start-attributes:
begin: \G
end: (?=/>)|>
endCaptures: { 0: { name: punctuation.definition.tag.end.svelte } }
name: meta.tag.start.svelte
patterns: [ include: '#attributes' ]

# Matches the beginning (`<name`) section of a tag start node.
tags-start-node:
match: (<)([^/\s>]*)
match: (<)([^/\s>/]*)
captures:
1: { name: punctuation.definition.tag.begin.svelte }
2: { patterns: [ include: '#tags-name' ] }
Expand Down Expand Up @@ -496,8 +494,8 @@ repository:
# Split up into start and end because we don't need to preserve the name
# inside and because it makes whitespace matching logic more robust
tags-general-start:
begin: (<)([^/\s>]*)
end: (>)
begin: (<)([^/\s>/]*)
end: (/?>)
beginCaptures: { 0: { patterns: [ include: '#tags-start-node' ] } }
endCaptures:
1: { name: meta.tag.start.svelte punctuation.definition.tag.end.svelte }
Expand Down