mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
fix: svg injection in ecma tagged literals
This commit is contained in:
parent
f15db0b652
commit
38f878a1cd
1 changed files with 5 additions and 5 deletions
|
|
@ -16,14 +16,14 @@
|
||||||
|
|
||||||
; svg`...` or svg(`...`), which uses the html parser, so is not included in the previous query
|
; svg`...` or svg(`...`), which uses the html parser, so is not included in the previous query
|
||||||
(call_expression
|
(call_expression
|
||||||
function: ((identifier) @svg)
|
function: ((identifier) @_name (#eq? @_name "svg"))
|
||||||
arguments: [
|
arguments: [
|
||||||
(arguments
|
(arguments
|
||||||
(template_string) @content)
|
(template_string) @html)
|
||||||
(template_string) @content
|
(template_string) @html
|
||||||
]
|
]
|
||||||
(#offset! @content 0 1 0 -1)
|
(#offset! @html 0 1 0 -1))
|
||||||
(#eq? @content "svg"))
|
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: ((identifier) @_name
|
function: ((identifier) @_name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue