Skip to content

Commit 25ffe66

Browse files
FichteFollskyronic
authored andcommitted
Add meta.template scope for mustache expressions
1 parent 466d8f7 commit 25ffe66

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

Vue Component.sublime-syntax

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,18 @@ contexts:
639639
- include: tag-event-attribute
640640
- include: tag-generic-attribute
641641
mustache-expression:
642-
- match: '{{'
643-
scope: punctuation.definition.template.begin.html
644-
embed: scope:source.js
645-
embed_scope: source.js.embedded.vue
646-
escape: '}}'
647-
escape_captures:
648-
0: punctuation.definition.template.end.html
642+
- match: (?={{)
643+
set:
644+
- meta_scope: meta.template.vue
645+
- match: '{{'
646+
scope: punctuation.definition.template.begin.html
647+
embed: scope:source.js
648+
embed_scope: source.js.embedded.vue
649+
escape: '}}'
650+
escape_captures:
651+
0: meta.template.vue punctuation.definition.template.end.html
652+
- match: ''
653+
pop: true
649654

650655
template-tag:
651656
- match: (<)((?i:template))\b

Vue Component.sublime-syntax.yaml-macros

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ contexts: !merge
1414
- include: mustache-expression
1515

1616
mustache-expression:
17-
- match: '{{'
18-
scope: punctuation.definition.template.begin.html
19-
embed: scope:source.js
20-
embed_scope: source.js.embedded.vue
21-
escape: '}}'
22-
escape_captures:
23-
0: punctuation.definition.template.end.html
17+
- match: '(?={{)'
18+
set:
19+
- meta_scope: meta.template.vue
20+
- match: '{{'
21+
scope: punctuation.definition.template.begin.html
22+
embed: scope:source.js
23+
embed_scope: source.js.embedded.vue
24+
escape: '}}'
25+
escape_captures:
26+
0: meta.template.vue punctuation.definition.template.end.html
27+
- match: ''
28+
pop: true
2429

2530
tag-attributes: !prepend
2631
- include: vue-directive

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy