mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Match all sql like strings as sql
This commit is contained in:
@@ -3,3 +3,8 @@
|
||||
function: (attribute attribute: (identifier) @id (#match? @id "execute|read_sql"))
|
||||
arguments: (argument_list
|
||||
(string (string_content) @injection.content (#set! injection.language "sql"))))
|
||||
|
||||
(string
|
||||
(string_content) @injection.content
|
||||
(#match? @injection.content "\\s*(SELECT|CREATE|DROP|INSERT|UPDATE|ALTER|DELETE|select|create|drop|insert|update|alter|delete)\\W+")
|
||||
(#set! injection.language "sql"))
|
||||
|
||||
Reference in New Issue
Block a user