diff options
| author | Lev Velykoivanenko <velykoivanenko.lev@gmail.com> | 2025-10-26 17:25:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-26 09:25:42 -0700 |
| commit | c53bb10a71a04860758757b190620814b4993a77 (patch) | |
| tree | 8390c77671b682894d42f5fe374f5f92552d0f80 /tests/query/injections/python/test.py | |
| parent | feat(parsers): update c3, desktop, dot, gomod, idl, julia, kitty, matlab, mli... (diff) | |
| download | nvim-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 'tests/query/injections/python/test.py')
| -rw-r--r-- | tests/query/injections/python/test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/query/injections/python/test.py b/tests/query/injections/python/test.py new file mode 100644 index 000000000..1d6a0a465 --- /dev/null +++ b/tests/query/injections/python/test.py @@ -0,0 +1,18 @@ +import re + +re_test = re.compile(r"^(?P<year>\d{4}) (?P<day>\d) \w\s{,3}$") +# ^ @regex +re_test = re.compile( + # comment + # ^ @comment + r"^(?P<year>\d{4}) " + # comment + # ^ @comment + r"(?P<day>\d) \w\s{,3}$" + # ^ @regex + # comment + # comment + # ^ @comment +) +print("foo %s bar %d" % ("arg1", 2)) +# ^ @printf |
