Skip to content

Commit

Permalink
Fix #2146
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Aug 10, 2020
1 parent 54438d3 commit 1bf61b4
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### 0.27.0

- `<PascalCase>` component should get highlighted like JSX/TSX when embedding other tags. #2146.
- Improve cross-file completion when declaring simple props with `props: ['foo']`. #2143.
- Completing child component should trigger props with `:` by default. #2140.
- Space should trigger completion only in HTML mode. #2139.
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/vue-html.YAML
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ patterns:
patterns:
- include: '#tag-stuff'
- name: meta.tag.block.any.html
begin: (</?)([a-zA-Z0-9:-]+\b)
begin: (</?)([a-z][a-zA-Z0-9:-]*\b)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.block.any.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 @@ -173,7 +173,7 @@
},
{
"name": "meta.tag.block.any.html",
"begin": "(</?)([a-zA-Z0-9:-]+\\b)",
"begin": "(</?)([a-z][a-zA-Z0-9:-]*\\b)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
Expand Down
3 changes: 3 additions & 0 deletions test/grammar/fixture/PascalCase.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<template>
<DIV></DIV>
<DIV />
<DIV>
<p></p>
</DIV>
</template>
176 changes: 176 additions & 0 deletions test/grammar/results/PascalCase_vue.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,182 @@
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": " ",
"t": "source.vue text.html.vue-html",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "<",
"t": "source.vue text.html.vue-html meta.tag.block.any.html punctuation.definition.tag.begin.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "DIV",
"t": "source.vue text.html.vue-html meta.tag.block.any.html support.class.component.html",
"r": {
"dark_plus": "support.class: #4EC9B0",
"light_plus": "support.class: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "support.class: #4EC9B0"
}
},
{
"c": ">",
"t": "source.vue text.html.vue-html meta.tag.block.any.html punctuation.definition.tag.end.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": " ",
"t": "source.vue text.html.vue-html",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "<",
"t": "source.vue text.html.vue-html meta.tag.any.html punctuation.definition.tag.begin.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "p",
"t": "source.vue text.html.vue-html meta.tag.any.html entity.name.tag.html",
"r": {
"dark_plus": "entity.name.tag: #569CD6",
"light_plus": "entity.name.tag: #800000",
"dark_vs": "entity.name.tag: #569CD6",
"light_vs": "entity.name.tag: #800000",
"hc_black": "entity.name.tag: #569CD6"
}
},
{
"c": ">",
"t": "source.vue text.html.vue-html meta.tag.any.html punctuation.definition.tag.end.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "<",
"t": "source.vue text.html.vue-html meta.tag.any.html punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "/",
"t": "source.vue text.html.vue-html meta.tag.any.html punctuation.definition.tag.begin.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "p",
"t": "source.vue text.html.vue-html meta.tag.any.html entity.name.tag.html",
"r": {
"dark_plus": "entity.name.tag: #569CD6",
"light_plus": "entity.name.tag: #800000",
"dark_vs": "entity.name.tag: #569CD6",
"light_vs": "entity.name.tag: #800000",
"hc_black": "entity.name.tag: #569CD6"
}
},
{
"c": ">",
"t": "source.vue text.html.vue-html meta.tag.any.html punctuation.definition.tag.end.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": " ",
"t": "source.vue text.html.vue-html",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "</",
"t": "source.vue text.html.vue-html meta.tag.block.any.html punctuation.definition.tag.begin.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "DIV",
"t": "source.vue text.html.vue-html meta.tag.block.any.html support.class.component.html",
"r": {
"dark_plus": "support.class: #4EC9B0",
"light_plus": "support.class: #267F99",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "support.class: #4EC9B0"
}
},
{
"c": ">",
"t": "source.vue text.html.vue-html meta.tag.block.any.html punctuation.definition.tag.end.html",
"r": {
"dark_plus": "punctuation.definition.tag: #808080",
"light_plus": "punctuation.definition.tag: #800000",
"dark_vs": "punctuation.definition.tag: #808080",
"light_vs": "punctuation.definition.tag: #800000",
"hc_black": "punctuation.definition.tag: #808080"
}
},
{
"c": "</",
"t": "source.vue punctuation.definition.tag.begin.html",
Expand Down

0 comments on commit 1bf61b4

Please sign in to comment.