Kaynağa Gözat

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

Morten Brix Pedersen 25 yıl önce
ebeveyn
işleme
5d0c76e8dd
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      modules/Pisg.pm

+ 2 - 0
modules/Pisg.pm

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