File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -868,14 +868,15 @@ get ['cleans']() {
868868 if ( this . thisToxic [ 1 ] === 1 && this . thisToxic . length > 2 ) {
869869 // If smart processing is enabled
870870 if ( this . _st === true ) {
871- var sensore = "*" ; // Initialize the masking string
871+ // var sensore = "*"; // Initialize the masking string
872872
873873 // 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+ // }
877877 // 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 ) ) ;
879880 }
880881
881882 // If smart processing is not enabled, just clean the text
You can’t perform that action at this time.
0 commit comments