Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitec6e5e7

Browse files
deathaxeskyronic
authored andcommitted
Fix attribute name interpolation
1. extend `meta.interpolation` to include leading and trailing punctuation to comply with ST's scope naming guidelines.2. fix closing `]` scope.3. adjust/add tests
1 parentfc9fc77 commitec6e5e7

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

‎Vue Component.sublime-syntax‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,10 @@ contexts:
623623
vue-dynamic-attribute-name:
624624
-clear_scopes:1# clear `entity.other.attribute-name`
625625
-match:\[
626-
scope:punctuation.section.interpolation.begin.vue
626+
scope:meta.interpolation.vuepunctuation.section.interpolation.begin.vue
627627
embed:scope:source.js#expression-statement
628628
embed_scope:meta.interpolation.vue source.js.embedded.vue
629629
escape:\]
630630
escape_captures:
631-
0:punctuation.definition.string.end.html
632-
-include:else-pop
631+
0:meta.interpolation.vuepunctuation.definition.interpolation.end.vue
632+
-include:immediately-pop

‎Vue Component.sublime-syntax.yaml-macros‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,10 @@ contexts:
396396
vue-dynamic-attribute-name:
397397
- clear_scopes: 1 # clear `entity.other.attribute-name`
398398
- match: \[
399-
scope: punctuation.section.interpolation.begin.vue
399+
scope:meta.interpolation.vuepunctuation.section.interpolation.begin.vue
400400
embed: scope:source.js#expression-statement
401401
embed_scope: meta.interpolation.vue source.js.embedded.vue
402402
escape: \]
403403
escape_captures:
404-
0: punctuation.definition.string.end.html
405-
- include:else-pop
404+
0:meta.interpolation.vuepunctuation.definition.interpolation.end.vue
405+
- include:immediately-pop

‎tests/syntax_tests_mustage.vue‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,20 @@
128128
<template #[`content-${variable}`]>
129129
// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html
130130
// ^ entity.other.attribute-name.html
131-
// ^ punctuation.section.interpolation.begin.vue
131+
// ^meta.interpolation.vuepunctuation.section.interpolation.begin.vue - source.js.embedded
132132
// ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.vue source.js.embedded.vue - entity.other.attribute-name.html
133-
// ^ punctuation.definition.string.end.html
133+
// ^meta.interpolation.vuepunctuation.definition.interpolation.end.vue - source.js.embedded
134134
// ^ meta.tag - meta.attribute-with-value
135135
// ^ - meta.tag
136136

137-
<template v-slot:[`content-${variable}`]>
137+
<template v-slot:[`content-${variable}`]>
138138
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html
139139
// ^^^^^^^ entity.other.attribute-name.html
140-
// ^ punctuation.section.interpolation.begin.vue
140+
// ^meta.interpolation.vuepunctuation.section.interpolation.begin.vue - source.js.embedded
141141
// ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.vue source.js.embedded.vue - entity.other.attribute-name.html
142-
// ^ punctuation.definition.string.end.html
143-
// ^ meta.tag - meta.attribute-with-value
144-
// ^ - meta.tag
142+
// ^ meta.interpolation.vue punctuation.definition.interpolation.end.vue - source.js.embedded
143+
// ^ meta.tag - meta.interpolation
144+
// ^ meta.tag - meta.attribute-with-value
145+
// ^ - meta.tag
145146

146147
</html>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp