2024-03-17 07:27:42 -04:00
|
|
|
; Comments
|
2024-01-06 15:05:50 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2023-04-20 05:20:02 -04:00
|
|
|
|
2024-03-17 07:27:42 -04:00
|
|
|
; Body
|
2023-05-03 19:07:59 +09:00
|
|
|
((json_body) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "json"))
|
2023-04-20 05:20:02 -04:00
|
|
|
|
2023-08-04 14:50:28 +03:00
|
|
|
((xml_body) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "xml"))
|
2023-04-20 05:20:02 -04:00
|
|
|
|
2024-08-21 03:08:45 -04:00
|
|
|
((graphql_data) @injection.content
|
2024-03-17 07:27:42 -04:00
|
|
|
(#set! injection.language "graphql"))
|
|
|
|
|
|
2024-08-21 03:08:45 -04:00
|
|
|
; Script (default to javascript)
|
|
|
|
|
((comment
|
|
|
|
|
name: (_) @_name
|
|
|
|
|
(#eq? @_name "lang")
|
2024-09-01 01:52:23 +09:00
|
|
|
value: (_) @injection.language)?
|
2024-08-21 03:08:45 -04:00
|
|
|
.
|
|
|
|
|
(_
|
|
|
|
|
(script) @injection.content
|
2024-09-01 01:52:23 +09:00
|
|
|
(#offset! @injection.content 0 2 0 -2))
|
|
|
|
|
(#set! injection.language "javascript"))
|