Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix normalized string append after clear #1636 #1660

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Anantha-Kandrapu
Copy link

  1. Rewrite of the append method:

    • The previous implementation used character indices and transformations.
    • The new implementation directly appends the string and updates alignments.
  2. Update to the clear method:

    • Instead of using the transform method, it now directly clears the normalized string and alignments.
    • Adds a single alignment point to represent the empty state after clearing.
  3. New test case:

    • Added test_append_after_clear to verify the behavior of appending after clearing a NormalizedString.
    • This test ensures that appending works correctly after clearing, and that original and normalized lengths are maintained properly.

#1636

@ArthurZucker ArthurZucker self-requested a review October 22, 2024 15:16
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.

1 participant