philterd/phileas

Adjust span start based on previous replacements

Closed this issue · 1 comments

The fix for #126 introduced a problem where the spans that needed to be replaced would not have their start/end updated accordingly after doing a prior replacement.

The issue is the code is updating identifiedSpans and not appliedSpans.

Example - the following text:

George Washington was president and his ssn was {{{REDACTED-ssn}}} and he lived at {{{REDACTED-zip-code}}}.

would be redacted as:

George Washington was president and his ssn was {{{REDACTED-ssn}}} and he li{{{REDACTED-zip-code}}}t 90210.

This needs a unit test.

Backported to 2.7.1.