Explorar el Código

patch from Phil Gregory to fix trailing spaces in 'foul' and 'violent'
settings

Morten Brix Pedersen hace 25 años
padre
commit
5d0c76e8dd
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      modules/Pisg.pm

+ 2 - 0
modules/Pisg.pm

@@ -270,10 +270,12 @@ sub close_debug
 sub init_words
 {
     my $self = shift;
+    $self->{cfg}->{foul} =~ s/(^\s+|\s+$)//g;
     $self->{cfg}->{foul} =~ s/\s+/|/g;
     foreach (split /\s+/, $self->{cfg}->{ignorewords}) {
         $self->{cfg}->{ignoreword}{$_} = 1;
     }
+    $self->{cfg}->{violent} =~ s/(^\s+|\s+$)//g;
     $self->{cfg}->{violent} =~ s/\s+/|/g;
 }