Inject JS and CSS in Pug

Injects JavaScript into `script` tags and CSS into `style` tags.
pull/13435/head
Spenser Black 2025-04-29 13:18:28 -04:00 committed by GitHub
parent d0f048d514
commit dd23db5211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,15 @@
((javascript) @injection.content
(#set! injection.language "javascript")
)
(
script_tag
((content_code) @injection.content
(#set! injection.language "javascript"))
)
(
style_tag
((content_code) @injection.content
(#set! injection.language "css"))
)