Skip to content

Commit

Permalink
Merge pull request #1465 from shroudedcode/highlight-directive-numbers
Browse files Browse the repository at this point in the history
Highlight directives containing numbers
  • Loading branch information
octref authored Dec 12, 2019
2 parents 5960c27 + 6ebc0de commit df229d1
Show file tree
Hide file tree
Showing 7 changed files with 556 additions and 5 deletions.
2 changes: 1 addition & 1 deletion syntaxes/vue-generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
},
"vue-directives": {
"name": "meta.directive.vue",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"end": "(?<='|\")|(?=[\\s<>`])",
"captures": {
"1": {
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/vue-html.YAML
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ repository:
match: (?<==)(?:[^\s<>/'"]|/(?!>))+
vue-directives:
name: meta.directive.vue
begin: (?:\b(v-)|(:|@|#))([a-zA-Z\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
begin: (?:\b(v-)|(:|@|#))([a-zA-Z0-9\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
end: (?<='|")|(?=[\s<>`])
captures:
'1': { name: entity.other.attribute-name.html }
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/vue-html.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
},
"vue-directives": {
"name": "meta.directive.vue",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"end": "(?<='|\")|(?=[\\s<>`])",
"captures": {
"1": {
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/vue.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@
},
"vue-directives": {
"name": "meta.directive.vue",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"end": "(?<='|\")|(?=[\\s<>`])",
"captures": {
"1": {
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/vue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ repository:
- include: '#string-single-quoted'
vue-directives:
name: meta.directive.vue
begin: (?:\b(v-)|(:|@|#))([a-zA-Z\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
begin: (?:\b(v-)|(:|@|#))([a-zA-Z0-9\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
end: (?<='|")|(?=[\s<>`])
captures:
'1': { name: entity.other.attribute-name.html }
Expand Down
10 changes: 10 additions & 0 deletions test/grammar/fixture/Issue1465.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<template>
<div>
<svg>
<line
:x1="line.start[0]"
:y1="true"
></line>
</svg>
</div>
</template>
Loading

0 comments on commit df229d1

Please sign in to comment.