Anders429 / word_filter

A Word Filter for filtering text.
Apache License 2.0
1 stars 0 forks source link

Repetitions after separators at end of match #78

Closed Anders429 closed 3 years ago

Anders429 commented 3 years ago

If we have a WordFilter filtering out the word "foo" with a space (' ') as a separator, then censoring the following text: "foo or bar" results in the censored "*****r bar". I would rather have the censored result be "*** or bar".

The issue is that the repetition catches the following character, even when it is separated from the rest of the word.

A solution for this would be to preserve the separator_grapheme value of the InstantaneousDescription when entering a repetition to ensure it is not matched at the end of a match following a separator.

Anders429 commented 3 years ago

Currently blocked by #79.