瀏覽代碼

Patch from Phil:
patch-pisg-ignoreurls modifies parse_words() to ignore "words" that are
obviously the result of splitting apart a URL. This should close
Sourceforge bug #450863.

Morten Brix Pedersen 25 年之前
父節點
當前提交
fe876695fe
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      pisg.pl

+ 3 - 0
pisg.pl

@@ -687,6 +687,9 @@ sub parse_words
         # ignore contractions
         next if ($word =~ m/'..?$/o);
 
+	# Also ignore stuff from URLs.
+	next if ($word =~ m{https?|^//});
+
         $wordcount{$word}++ unless ($users->{ignores}{$word});
         $lastused{$word} = $nick;
     }