mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(ecma): fix no injections for innerHTML (#5258)
This commit is contained in:
parent
64d1696d6d
commit
294f753ed3
1 changed files with 10 additions and 5 deletions
|
|
@ -100,6 +100,15 @@
|
|||
(#set! injection.language "graphql"))
|
||||
|
||||
; el.innerHTML = `<html>`
|
||||
(assignment_expression
|
||||
left:
|
||||
(member_expression
|
||||
property: (property_identifier) @_prop
|
||||
(#any-of? @_prop "outerHTML" "innerHTML"))
|
||||
right: (template_string) @injection.content
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "html"))
|
||||
|
||||
; el.innerHTML = '<html>'
|
||||
(assignment_expression
|
||||
left:
|
||||
|
|
@ -107,9 +116,5 @@
|
|||
property: (property_identifier) @_prop
|
||||
(#any-of? @_prop "outerHTML" "innerHTML"))
|
||||
right:
|
||||
[
|
||||
(template_string)
|
||||
(string)
|
||||
] @injection.content
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(string (string_fragment) @injection.content)
|
||||
(#set! injection.language "html"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue