mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 12:06:55 -04:00
refactor(python): update regex injection to use injection.combined
This commit is contained in:
parent
0dc9eaaa4e
commit
ddcf1ae900
1 changed files with 13 additions and 16 deletions
|
|
@ -1,23 +1,20 @@
|
|||
(call
|
||||
function: (attribute
|
||||
object: (identifier) @_re)
|
||||
arguments: (argument_list
|
||||
.
|
||||
(string
|
||||
(string_content) @injection.content))
|
||||
(#eq? @_re "re")
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
(call
|
||||
function: (attribute
|
||||
object: (identifier) @_re)
|
||||
arguments: (argument_list
|
||||
.
|
||||
(concatenated_string
|
||||
arguments: [
|
||||
(argument_list
|
||||
.
|
||||
(string
|
||||
(string_content) @injection.content))
|
||||
(#eq? @_re "re")
|
||||
(#set! injection.language "regex")))
|
||||
(string_content) @injection.content)
|
||||
(#set! injection.language "regex"))
|
||||
(argument_list
|
||||
.
|
||||
(concatenated_string
|
||||
(string
|
||||
(string_content) @injection.content)))
|
||||
]
|
||||
(#eq? @_re "re")
|
||||
(#set! injection.combined))
|
||||
|
||||
((binary_operator
|
||||
left: (string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue