mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 20:00:07 -04:00
fix(python): right content for regex injection
This commit is contained in:
parent
59f06b3b33
commit
922c396b26
1 changed files with 7 additions and 6 deletions
|
|
@ -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"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue