diff options
| author | Craig Hammond | 2015-02-01 12:23:25 -0400 |
|---|---|---|
| committer | Craig Hammond | 2015-02-01 12:23:25 -0400 |
| commit | 2b5f93b005bfa0aa325d9ba3c4d0b64f2584f970 (patch) | |
| tree | 9c5bac66da78d384ec69c7b7703bf2286222d8af /scripts | |
| parent | 4e4d19eb64b3b3e6a40f48b4ca4df30cfecfe131 (diff) | |
| download | scripts.irssi.org-2b5f93b005bfa0aa325d9ba3c4d0b64f2584f970.tar.bz2 | |
Both $re variables given distinct names.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/spellcheck.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/spellcheck.pl b/scripts/spellcheck.pl index 349a20e..cc81487 100644 --- a/scripts/spellcheck.pl +++ b/scripts/spellcheck.pl @@ -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 |
