Skip to content

Commit d94c100

Browse files
authored
fix(vscode): correct syntax highlight for directives starting with v-for (#5399)
1 parent 1d5883e commit d94c100

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

extensions/vscode/syntaxes/vue.tmLanguage.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -974,13 +974,13 @@
974974
"include": "#vue-directives-control"
975975
},
976976
{
977-
"include": "#vue-directives-style-attr"
977+
"include": "#vue-directives-generic-attr"
978978
},
979979
{
980-
"include": "#vue-directives-original"
980+
"include": "#vue-directives-style-attr"
981981
},
982982
{
983-
"include": "#vue-directives-generic-attr"
983+
"include": "#vue-directives-original"
984984
}
985985
]
986986
},
@@ -1021,14 +1021,9 @@
10211021
}
10221022
},
10231023
"end": "(?=\\s*[^=\\s])",
1024-
"endCaptures": {
1025-
"1": {
1026-
"name": "punctuation.definition.string.end.html.vue"
1027-
}
1028-
},
10291024
"name": "meta.attribute.directive.vue",
10301025
"patterns": [
1031-
{
1026+
{
10321027
"match": "(\\.)([\\w-]*)",
10331028
"1": {
10341029
"name": "punctuation.separator.key-value.html.vue"
@@ -1043,16 +1038,16 @@
10431038
]
10441039
},
10451040
"vue-directives-control": {
1046-
"begin": "(v-for)|(v-if|v-else-if|v-else)",
1047-
"captures": {
1041+
"begin": "(?:(v-for)|(v-if|v-else-if|v-else))(?==)",
1042+
"beginCaptures": {
10481043
"1": {
10491044
"name": "keyword.control.loop.vue"
10501045
},
10511046
"2": {
10521047
"name": "keyword.control.conditional.vue"
10531048
}
10541049
},
1055-
"end": "(?=\\s*+[^=\\s])",
1050+
"end": "(?=\\s*[^=\\s])",
10561051
"name": "meta.attribute.directive.control.vue",
10571052
"patterns": [
10581053
{
@@ -1116,7 +1111,7 @@
11161111
},
11171112
"vue-directives-style-attr": {
11181113
"begin": "\\b(style)\\s*(=)",
1119-
"captures": {
1114+
"beginCaptures": {
11201115
"1": {
11211116
"name": "entity.other.attribute-name.html.vue"
11221117
},
@@ -1200,7 +1195,7 @@
12001195
},
12011196
"vue-directives-generic-attr": {
12021197
"begin": "\\b(generic)\\s*(=)",
1203-
"captures": {
1198+
"beginCaptures": {
12041199
"1": {
12051200
"name": "entity.other.attribute-name.html.vue"
12061201
},

0 commit comments

Comments
 (0)