-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pii): Ignore
replacement_chunks
when they aren't used (#1180)
With ReplaceBehavior::Value, we only want to replace a string value. This means we don't need the replacement chunks since `insert_replacement_chunks` correctly adds the replacement and the `process_text` function is useless because we don't need it (besides, processing an empty string doesn't perform any action). Now that the `replacement_chunks` are only needed in ReplaceBehavior::Groups, we can move the processing and assertion we do on them to that branch of the `match`. This solves the issue of asserting on them when we don't use them.
- Loading branch information
1 parent
ea87ce6
commit 760c683
Showing
2 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters