Skip to content

Commit 65d7b1e

Browse files
FichteFollskyronic
authored andcommitted
Add highlighting for #attr="name-list" slot syntax
1 parent c3b982b commit 65d7b1e

File tree

3 files changed

+62
-2
lines changed

3 files changed

+62
-2
lines changed

Vue Component.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ contexts:
578578
- vue-directive-meta
579579
- vue-directive-assignment
580580
- tag-generic-attribute-name
581-
- match: (?::|@)
581+
- match: (?::|@|#)
582582
scope: punctuation.definition.attribute.html
583583
push:
584584
- vue-directive-meta

Vue Component.sublime-syntax.yaml-macros

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ contexts:
339339
- vue-directive-meta
340340
- vue-directive-assignment
341341
- tag-generic-attribute-name
342-
- match: (?::|@)
342+
- match: (?::|@|#)
343343
scope: punctuation.definition.attribute.html
344344
push:
345345
- vue-directive-meta

tests/syntax_tests_mustage.vue

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,64 @@
6565
// ^ meta.tag - meta.attribute-with-value
6666
// ^ - meta.tag
6767

68+
<p @handler="function_call($event)">
69+
// ^^^ meta.tag - meta.attribute-with-value
70+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
71+
// ^ punctuation.definition.attribute.html
72+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
73+
// ^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
74+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
75+
// ^ meta.tag - meta.attribute-with-value
76+
// ^ - meta.tag
77+
78+
<p @handler='function_call($event)'>
79+
// ^^^ meta.tag - meta.attribute-with-value
80+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
81+
// ^ punctuation.definition.attribute.html
82+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
83+
// ^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
84+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
85+
// ^ meta.tag - meta.attribute-with-value
86+
// ^ - meta.tag
87+
88+
<p #handler="variable">
89+
// ^^^ meta.tag - meta.attribute-with-value
90+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
91+
// ^ punctuation.definition.attribute.html
92+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
93+
// ^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
94+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
95+
// ^ meta.tag - meta.attribute-with-value
96+
// ^ - meta.tag
97+
98+
<p #handler='variable'>
99+
// ^^^ meta.tag - meta.attribute-with-value
100+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
101+
// ^ punctuation.definition.attribute.html
102+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
103+
// ^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
104+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
105+
// ^ meta.tag - meta.attribute-with-value
106+
// ^ - meta.tag
107+
108+
<p :handler="expression">
109+
// ^^^ meta.tag - meta.attribute-with-value
110+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
111+
// ^ punctuation.definition.attribute.html
112+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
113+
// ^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
114+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
115+
// ^ meta.tag - meta.attribute-with-value
116+
// ^ - meta.tag
117+
118+
<p :handler='expression'>
119+
// ^^^ meta.tag - meta.attribute-with-value
120+
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
121+
// ^ punctuation.definition.attribute.html
122+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
123+
// ^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
124+
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
125+
// ^ meta.tag - meta.attribute-with-value
126+
// ^ - meta.tag
127+
68128
</html>

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