From 635c5f5228498f8c22b02d1c5fb18759693d92ac Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 14 May 2025 10:14:22 +0200 Subject: [PATCH] Allow leading newlines in python's sql injections --- nvim/after/queries/python/injections.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/after/queries/python/injections.scm b/nvim/after/queries/python/injections.scm index c5548fe..7545c3f 100644 --- a/nvim/after/queries/python/injections.scm +++ b/nvim/after/queries/python/injections.scm @@ -6,5 +6,5 @@ (string (string_content) @injection.content - (#match? @injection.content "\\s*(SELECT|CREATE|DROP|INSERT|UPDATE|ALTER|DELETE|select|create|drop|insert|update|alter|delete)\\W+") + (#match? @injection.content "^\n*\\s*(SELECT|CREATE|DROP|INSERT|UPDATE|ALTER|DELETE|select|create|drop|insert|update|alter|delete)\\W+") (#set! injection.language "sql"))