aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/python/highlights.scm
diff options
context:
space:
mode:
authorLev Velykoivanenko <velykoivanenko.lev@gmail.com>2025-10-26 17:25:42 +0100
committerGitHub <noreply@github.com>2025-10-26 09:25:42 -0700
commitc53bb10a71a04860758757b190620814b4993a77 (patch)
tree8390c77671b682894d42f5fe374f5f92552d0f80 /runtime/queries/python/highlights.scm
parentfeat(parsers): update c3, desktop, dot, gomod, idl, julia, kitty, matlab, mli... (diff)
downloadnvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar.gz
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar.bz2
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar.lz
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar.xz
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.tar.zst
nvim-treesitter-c53bb10a71a04860758757b190620814b4993a77.zip
fix(python): regex injection not working for concatenated strings (#8197)
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Diffstat (limited to 'runtime/queries/python/highlights.scm')
-rw-r--r--runtime/queries/python/highlights.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index 70f6d9acc..350990b1f 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -417,11 +417,19 @@
function: (attribute
object: (identifier) @_re)
arguments: (argument_list
- .
(string
(string_content) @string.regexp))
(#eq? @_re "re"))
+(call
+ function: (attribute
+ object: (identifier) @_re)
+ arguments: (argument_list
+ (concatenated_string
+ (string
+ (string_content) @string.regexp)))
+ (#eq? @_re "re"))
+
; Decorators
((decorator
"@" @attribute)