nvim-treesitter/tests/query/highlights/starlark/test.bzl
Lev Velykoivanenko c53bb10a71
fix(python): regex injection not working for concatenated strings (#8197)
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-10-26 09:25:42 -07:00

11 lines
372 B
Python

# split
# ^ @comment
assert_eq('foo bar'.split(' '), ['foo', 'bar'])
# ^ @keyword
# ^ @punctuation.bracket
# ^ @string
# ^ @punctuation.delimiter
assert_eq('foo bar foo'.rsplit(' ', 1), ['foo bar', 'foo'])
# ^ @number
assert_eq("foo %s bar %d" % ("arg1", 2), "foo arg1 bar 2")
# ^ @character