]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Both $re variables given distinct names.
authorCraig Hammond <redacted>
Sun, 1 Feb 2015 16:23:25 +0000 (12:23 -0400)
committerCraig Hammond <redacted>
Sun, 1 Feb 2015 16:23:25 +0000 (12:23 -0400)
scripts/spellcheck.pl

index 349a20ebef6a915a4a4041def72cec6012dc9860..cc81487ddbba78b7e7bee7bc7848249898c4f007 100644 (file)
@@ -173,21 +173,21 @@ sub spellcheck_key_pressed
     # check if inputline starts with any of cmdchars
     # we shouldn't spellcheck commands
     my $cmdchars = Irssi::settings_get_str('cmdchars');
-    my $re = qr/^[$cmdchars]/;
-    return if ($inputline =~ $re);
+    my $cmdre = qr/^[$cmdchars]/;
+    return if ($inputline =~ $cmdre);
 
     # get last bit from the inputline
     my ($word) = $inputline =~ /\s*([^\s]+)$/;
 
     # do not spellcheck urls
-    my $re = qr/([a-zA-Z]+:\/\/\S+)|(^www)/;
-    return if ($word =~ $re);
+    my $urlre = qr/(^[a-zA-Z]+:\/\/\S+)|(^www)/;
+    return if ($word =~ $urlre);
 
     # find appropriate language for current window item
     my $lang = spellcheck_find_language($win->{active_server}->{tag}, $win->{active}->{name});
 
     my @suggestions = spellcheck_check_word($lang, $word, 0);
-    #Irssi::print("Debug: spellcheck_check_word($word) returned array of " . scalar @suggestions);
+    # Irssi::print("Debug: spellcheck_check_word($word) returned array of " . scalar @suggestions);
     return if (scalar @suggestions == 0);
 
     # we found a mistake, print suggestions
git clone https://git.99rst.org/PROJECT