瀏覽代碼

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;
 }