Sfoglia il codice sorgente

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 anni fa
parent
commit
fe876695fe
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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;
     }