Skip to content

Fix: Correct search window calculation in ApplyXMLMixin#334

Merged
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v1-1779967718
May 28, 2026
Merged

Fix: Correct search window calculation in ApplyXMLMixin#334
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v1-1779967718

Conversation

@pyob-bot
Copy link
Copy Markdown
Collaborator

Summary of Changes

This PR updates the loop range calculation in ApplyXMLMixin to use the length of the original search_lines list rather than search_lines_stripped. This ensures that the search window correctly accounts for the full block of code being replaced, preventing potential index errors or incorrect matching behavior.

Technical Impact

  • Correctness: Aligns the iteration range with the actual number of lines being searched, ensuring the replacement logic operates on the intended scope.
  • Stability: Prevents off-by-one errors during the code replacement process, leading to more reliable XML-based code transformations.

@vicsanity623 vicsanity623 merged commit 76d28be into main May 28, 2026
1 check passed
@vicsanity623 vicsanity623 deleted the pyob-evolution-v1-1779967718 branch May 28, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants