fix(ecma): template literal injections

see e3ebc8ec5d (commitcomment-104824257) for explanation

This also assigns the HTML parser for SVG tagged literals, since svg uses the HTML parser
This commit is contained in:
Benny Powers 2023-03-17 09:51:16 +02:00 committed by Amaan Qureshi
parent 6a269f197e
commit 1ba94e9f01

View file

@ -11,6 +11,19 @@
(#offset! @content 0 1 0 -1))
)
; html`...`, sql`...` etc
(call_expression
function: ((identifier) @language)
arguments: ((template_string) @content
(#offset! @content 0 1 0 -1))
)
; svg`...`, which uses the html parser
(call_expression
function: ((identifier) @_name (#eq? @_name "svg"))
arguments: ((template_string) @html
(#offset! @html 0 1 0 -1)))
(call_expression
function: ((identifier) @_name
(#eq? @_name "gql"))