Jelajahi Sumber

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 tahun lalu
induk
melakukan
fe876695fe
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  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;
     }