Skip to content

Commit

Permalink
Extend meta.expression scope
Browse files Browse the repository at this point in the history
This commit adds `.expression` sub-scope name to distinguish embedded
interpolation expressions from control flow statements.
  • Loading branch information
deathaxe authored and princemaple committed Dec 17, 2024
1 parent 5c37b59 commit 9023d19
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 55 deletions.
10 changes: 5 additions & 5 deletions NgxHTML.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ contexts:
- match: \"
scope: meta.string.ngx string.quoted.double.ngx punctuation.definition.string.begin.ngx
embed: ng-directive-expressions
embed_scope: meta.directive.value.ngx meta.string.ngx meta.interpolation.ngx source.ngx.embedded.html
embed_scope: meta.directive.value.ngx meta.string.ngx meta.embedded.expression.ngx source.ngx.embedded.html
escape: \"
escape_captures:
0: meta.string.ngx string.quoted.double.ngx punctuation.definition.string.end.ngx
pop: 1
- match: \'
scope: meta.string.ngx string.quoted.single.ngx punctuation.definition.string.begin.ngx
embed: ng-directive-expressions
embed_scope: meta.directive.value.ngx meta.string.ngx meta.interpolation.ngx source.ngx.embedded.html
embed_scope: meta.directive.value.ngx meta.string.ngx meta.embedded.expression.ngx source.ngx.embedded.html
escape: \'
escape_captures:
0: meta.string.ngx string.quoted.single.ngx punctuation.definition.string.end.ngx
Expand Down Expand Up @@ -297,14 +297,14 @@ contexts:

ng-interpolations:
- match: '{{'
scope: meta.embedded.ngx.html punctuation.section.embedded.begin.ngx.html
scope: meta.embedded.expression.ngx.html punctuation.section.embedded.begin.ngx.html
push: ng-interpolation-body

ng-interpolation-body:
- meta_include_prototype: false
- meta_content_scope: meta.embedded.ngx.html source.ngx.embedded.html
- meta_content_scope: meta.embedded.expression.ngx.html source.ngx.embedded.html
- match: '}}'
scope: meta.embedded.ngx.html punctuation.section.embedded.end.ngx.html
scope: meta.embedded.expression.ngx.html punctuation.section.embedded.end.ngx.html
pop: 1
- include: ng-expressions

Expand Down
Loading

0 comments on commit 9023d19

Please sign in to comment.