html: Add injections for style
attributes and event handler attributes (#23659)
Closes #23653 Before: <img width="921" alt="before" src="https://github.com/user-attachments/assets/e993df15-77a7-4b5a-b6fb-3415047914c0" /> After: <img width="922" alt="after" src="https://github.com/user-attachments/assets/1b4bd695-2985-46e2-8b55-576d32af0583" /> Release Notes: - N/A
This commit is contained in:
parent
33af6bce55
commit
27781a8a60
1 changed files with 10 additions and 0 deletions
|
@ -5,3 +5,13 @@
|
|||
(style_element
|
||||
(raw_text) @injection.content
|
||||
(#set! injection.language "css"))
|
||||
|
||||
(attribute
|
||||
(attribute_name) @_attribute_name (#match? @_attribute_name "^style$")
|
||||
(quoted_attribute_value (attribute_value) @injection.content)
|
||||
(#set! injection.language "css"))
|
||||
|
||||
(attribute
|
||||
(attribute_name) @_attribute_name (#match? @_attribute_name "^on[a-z]+$")
|
||||
(quoted_attribute_value (attribute_value) @injection.content)
|
||||
(#set! injection.language "javascript"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue