File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -868,14 +868,15 @@ get ['cleans']() {
868
868
if ( this . thisToxic [ 1 ] === 1 && this . thisToxic . length > 2 ) {
869
869
// If smart processing is enabled
870
870
if ( this . _st === true ) {
871
- var sensore = "*" ; // Initialize the masking string
871
+ // var sensore = "*"; // Initialize the masking string
872
872
873
873
// Create a string of asterisks of the same length as the toxic word
874
- for ( var i = 0 ; i < this . thisToxic [ 2 ] . length ; i ++ ) {
875
- sensore += "*" ; // Append asterisks for each character in the toxic word
876
- }
874
+ // for (var i = 0; i < this.thisToxic[2].length; i++) {
875
+ // sensore += "*"; // Append asterisks for each character in the toxic word
876
+ // }
877
877
// Clean the text and replace the toxic word with asterisks
878
- return this . clean ( this . position ( ) ) . replace ( this . thisToxic [ 2 ] , sensore ) ;
878
+ return this . clean ( this . position ( ) ) . replace ( this . __filt__ ,
879
+ ( matchedWord ) => '*' . repeat ( matchedWord . length ) ) ;
879
880
}
880
881
881
882
// If smart processing is not enabled, just clean the text
You can’t perform that action at this time.
0 commit comments