mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 17:00:09 -04:00
fix(python): regex injection not working for concatenated strings
This commit is contained in:
parent
0606c7a9dc
commit
0dc9eaaa4e
1 changed files with 11 additions and 0 deletions
|
|
@ -8,6 +8,17 @@
|
||||||
(#eq? @_re "re")
|
(#eq? @_re "re")
|
||||||
(#set! injection.language "regex"))
|
(#set! injection.language "regex"))
|
||||||
|
|
||||||
|
(call
|
||||||
|
function: (attribute
|
||||||
|
object: (identifier) @_re)
|
||||||
|
arguments: (argument_list
|
||||||
|
.
|
||||||
|
(concatenated_string
|
||||||
|
(string
|
||||||
|
(string_content) @injection.content))
|
||||||
|
(#eq? @_re "re")
|
||||||
|
(#set! injection.language "regex")))
|
||||||
|
|
||||||
((binary_operator
|
((binary_operator
|
||||||
left: (string
|
left: (string
|
||||||
(string_content) @injection.content)
|
(string_content) @injection.content)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue