fix_v4
Browse files
app.py
CHANGED
@@ -54,10 +54,10 @@ def check_text(text, tool):
|
|
54 |
errors = sorted(errors, key=lambda x: x['end'])
|
55 |
|
56 |
shift = 0
|
57 |
-
for i, error in errors:
|
58 |
error['start'] += shift
|
59 |
error['end'] += shift
|
60 |
-
inp = f"({
|
61 |
text = text[:error['end']] + inp + text[error['end']:]
|
62 |
shift += len(inp)
|
63 |
|
|
|
54 |
errors = sorted(errors, key=lambda x: x['end'])
|
55 |
|
56 |
shift = 0
|
57 |
+
for i, error in enumerate(errors):
|
58 |
error['start'] += shift
|
59 |
error['end'] += shift
|
60 |
+
inp = f"({i + 1})"
|
61 |
text = text[:error['end']] + inp + text[error['end']:]
|
62 |
shift += len(inp)
|
63 |
|