mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
Fix(vue): Invalid match queries
This commit is contained in:
parent
8abb563ca9
commit
f5d517f4a7
2 changed files with 35 additions and 7 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
(start_tag) @_no_attribute
|
(start_tag) @_no_attribute
|
||||||
(raw_text) @css)
|
(raw_text) @css)
|
||||||
(#match? @_no_attribute "^\\<\\s*style\\s*\\>$")
|
(#match? @_no_attribute "^\\<\\s*style\\s*\\>$")
|
||||||
|
; unsure why, but without escaping < and > the query breaks
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<span>{{"Some text"}}</span>
|
<span>{{"Text inside interpolation"}}</span>
|
||||||
<!-- ^ javascript
|
<!-- ^ javascript
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
ul
|
ul
|
||||||
li(v-for="item in items")
|
li(v-for="item in items")
|
||||||
a(v-if="item.type == 'link'" :href="item.url") some link title:
|
a(v-if="item.type == 'link'" :href="item.url") some link title in pug:
|
||||||
<!-- ^ pug
|
<!-- ^ pug
|
||||||
-->
|
-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="true"></template>
|
<template v-if="'text inside directives'"></template>
|
||||||
<!-- ^ javascript
|
<!-- ^ javascript
|
||||||
-->
|
-->
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -19,23 +19,50 @@
|
||||||
const foo = "1"
|
const foo = "1"
|
||||||
// ^ javascript
|
// ^ javascript
|
||||||
</script>
|
</script>
|
||||||
<script defer lang="js">
|
<script defer>
|
||||||
|
const foo = "1"
|
||||||
|
// ^ javascript
|
||||||
|
</script>
|
||||||
|
<script lang="js">
|
||||||
const foo = "1"
|
const foo = "1"
|
||||||
// ^ javascript
|
// ^ javascript
|
||||||
</script>
|
</script>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
const foo = "1"
|
const foo: number = "1"
|
||||||
// ^ typescript
|
// ^ typescript
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.bar {
|
.bar {
|
||||||
/* ^ css*/
|
/* ^ css
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.page.page--news {
|
||||||
|
padding: calc(var(--header-height)) 1rem 0 1rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100vw;
|
||||||
|
min-height: calc(var(--vh, 1vh) * 100 - var(--header-height));
|
||||||
|
background: rebeccapurple;
|
||||||
|
/* ^ css
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="css">
|
||||||
|
.bar {
|
||||||
|
justify-content: center;
|
||||||
|
/* ^ css
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.bar {
|
.bar {
|
||||||
&-baz {
|
&-baz {
|
||||||
|
&.page{
|
||||||
// ^ scss
|
// ^ scss
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue