mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-23 05:40:11 -04:00
fix(python): improve f-string injections (#8644)
Problem: Neovim removed match limits, which can lead to catastrophic performance with injection queries. Solution: Tighten up f-string injections.
This commit is contained in:
parent
2497714755
commit
7248feaca4
2 changed files with 23 additions and 6 deletions
|
|
@ -14,5 +14,15 @@ re_test = re.compile(
|
|||
# comment
|
||||
# ^ @comment
|
||||
)
|
||||
a.a(
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
f"<td class=\"a{a}\">{a}</td>"
|
||||
)
|
||||
print("foo %s bar %d" % ("arg1", 2))
|
||||
# ^ @printf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue