diff options
Diffstat (limited to 'runtime/queries/python')
| -rw-r--r-- | runtime/queries/python/highlights.scm | 10 | ||||
| -rw-r--r-- | runtime/queries/python/injections.scm | 14 |
2 files changed, 22 insertions, 2 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) diff --git a/runtime/queries/python/injections.scm b/runtime/queries/python/injections.scm index bbc924be4..2a120d9b5 100644 --- a/runtime/queries/python/injections.scm +++ b/runtime/queries/python/injections.scm @@ -2,12 +2,24 @@ 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 + [ + (string + (string_content) @injection.content) + (comment) + ]+)) + (#eq? @_re "re") + (#set! injection.language "regex")) + ((binary_operator left: (string (string_content) @injection.content) |
