fix(python): right content for regex injection

This commit is contained in:
TheLeoP 2023-08-14 10:50:59 -05:00 committed by Amaan Qureshi
parent 59f06b3b33
commit 922c396b26

View file

@ -1,10 +1,11 @@
((call (call
function: (attribute function: (attribute
object: (identifier) @_re) object: (identifier) @_re)
arguments: (argument_list (string) @injection.content)) arguments: (argument_list (string
(#eq? @_re "re") (string_content) @injection.content) @_string)
(#lua-match? @injection.content "^r.*") (#eq? @_re "re")
(#set! injection.language "regex")) (#lua-match? @_string "^r.*")
(#set! injection.language "regex"))
((comment) @injection.content ((comment) @injection.content
(#set! injection.language "comment")) (#set! injection.language "comment"))