Replace usage of "match" as a variable name

This commit is contained in:
Veronica Berglyd Olsen
2024-10-14 00:14:08 +02:00
parent 57e739c3ef
commit 2447ae5cff
4 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -343,9 +343,9 @@ class DocSearch:
count = 0
capped = False
results = []
for match in self._regEx.finditer(text):
pos = match.start(0)
num = len(match.group(0))
for res in self._regEx.finditer(text):
pos = res.start(0)
num = len(res.group(0))
lim = text[:pos].rfind("\n") + 1
cut = text[lim:pos].rfind(" ") + lim + 1
context = text[cut:cut+100].partition("\n")[0]