Skip to content

Commit 865cc9d

Browse files
FichteFollskyronic
authored andcommitted
Use vue suffix for embed_scope in attributes and mustache
This allows easily targeting the embed scopes inside attributes as something that is contributed and supported by the vue syntax only as opposed to a a `<script>` tag which uses HTML syntax.
1 parent 4c6622a commit 865cc9d

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Vue Component.sublime-syntax

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ contexts:
557557

558558
mustache-interpolation-content:
559559
- clear_scopes: 1
560-
- meta_scope: meta.interpolation.html
560+
- meta_scope: meta.interpolation.vue
561561
- include: mustache-templates
562562
- include: immediately-pop
563563

@@ -600,15 +600,15 @@ contexts:
600600
- match: \"
601601
scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html
602602
embed: scope:source.js#expression-statement
603-
embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html
603+
embed_scope: meta.string.html meta.interpolation.vue source.js.embedded.vue
604604
escape: \"
605605
escape_captures:
606606
0: meta.attribute-with-value.directive.html meta.string.html string.quoted.double.html
607607
punctuation.definition.string.end.html
608608
- match: \'
609609
scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html
610610
embed: scope:source.js#expression-statement
611-
embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html
611+
embed_scope: meta.string.html meta.interpolation.vue source.js.embedded.vue
612612
escape: \'
613613
escape_captures:
614614
0: meta.attribute-with-value.directive.html meta.string.html string.quoted.single.html

Vue Component.sublime-syntax.yaml-macros

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ contexts:
318318

319319
mustache-interpolation-content:
320320
- clear_scopes: 1
321-
- meta_scope: meta.interpolation.html
321+
- meta_scope: meta.interpolation.vue
322322
- include: mustache-templates
323323
- include: immediately-pop
324324

@@ -364,8 +364,8 @@ contexts:
364364
punctuation.definition.string.begin.html
365365
embed: scope:source.js#expression-statement
366366
embed_scope:
367-
meta.string.html meta.interpolation.html
368-
source.js.embedded.html
367+
meta.string.html meta.interpolation.vue
368+
source.js.embedded.vue
369369
escape: \"
370370
escape_captures:
371371
0:
@@ -378,8 +378,8 @@ contexts:
378378
punctuation.definition.string.begin.html
379379
embed: scope:source.js#expression-statement
380380
embed_scope:
381-
meta.string.html meta.interpolation.html
382-
source.js.embedded.html
381+
meta.string.html meta.interpolation.vue
382+
source.js.embedded.vue
383383
escape: \'
384384
escape_captures:
385385
0:

tests/syntax_tests_mustage.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<p attrib="{{ foo.value }}" >
1616
// ^ meta.tag meta.attribute-with-value.html meta.string.html - meta.interpolation
17-
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.html
17+
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.vue
1818
// ^ meta.tag meta.attribute-with-value.html meta.string.html - meta.interpolation
1919
// ^ string.quoted.double.html punctuation.definition.string.begin.html
2020
// ^^ punctuation.definition.template.begin.html - source.js
@@ -24,7 +24,7 @@
2424

2525
<p attrib='{{ foo.value }}' >
2626
// ^ meta.tag meta.attribute-with-value.html meta.string.html - meta.interpolation
27-
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.html
27+
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.vue
2828
// ^ meta.tag meta.attribute-with-value.html meta.string.html - meta.interpolation
2929
// ^ string.quoted.single.html punctuation.definition.string.begin.html
3030
// ^^ punctuation.definition.template.begin.html - source.js
@@ -33,7 +33,7 @@
3333
// ^ string.quoted.single.html punctuation.definition.string.end.html
3434

3535
<p attrib={{ foo.value }} >
36-
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.html
36+
// ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.html meta.string.html meta.interpolation.vue
3737
// ^^ punctuation.definition.template.begin.html - source.js
3838
// ^^^^^^^^^^^ source.js.embedded.vue
3939
// ^^ punctuation.definition.template.end.html - source.js
@@ -42,7 +42,7 @@
4242
// ^^^ meta.tag - meta.attribute-with-value
4343
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
4444
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
45-
// ^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.html source.js.embedded.html meta.mapping
45+
// ^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue meta.mapping
4646
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
4747
// ^ meta.tag - meta.attribute-with-value
4848
// ^ - meta.tag
@@ -51,7 +51,7 @@
5151
// ^^^ meta.tag - meta.attribute-with-value
5252
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
5353
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
54-
// ^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.html source.js.embedded.html
54+
// ^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
5555
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
5656
// ^ meta.tag - meta.attribute-with-value
5757
// ^ - meta.tag
@@ -60,7 +60,7 @@
6060
// ^^^ meta.tag - meta.attribute-with-value
6161
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
6262
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
63-
// ^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.html source.js.embedded.html
63+
// ^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
6464
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
6565
// ^ meta.tag - meta.attribute-with-value
6666
// ^ - meta.tag

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