fix: svg injection in ecma tagged literals

This commit is contained in:
Benny Powers 2023-03-18 22:12:27 +02:00 committed by Amaan Qureshi
parent f15db0b652
commit 38f878a1cd

View file

@ -16,14 +16,14 @@
; svg`...` or svg(`...`), which uses the html parser, so is not included in the previous query
(call_expression
function: ((identifier) @svg)
function: ((identifier) @_name (#eq? @_name "svg"))
arguments: [
(arguments
(template_string) @content)
(template_string) @content
(template_string) @html)
(template_string) @html
]
(#offset! @content 0 1 0 -1)
(#eq? @content "svg"))
(#offset! @html 0 1 0 -1))
(call_expression
function: ((identifier) @_name