فهرست منبع

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

Morten Brix Pedersen 25 سال پیش
والد
کامیت
5d0c76e8dd
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  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;
 }