From 18629c826103b74aa0627936e05892e21e513f16 Mon Sep 17 00:00:00 2001 From: Nigel Date: Fri, 24 Nov 2023 19:34:04 +0000 Subject: [PATCH] Don't skip bad words in Spell Query The SQ threshold stops words that appear lots of times from being reported as spelling errors. That check shouldn't apply to bad words, which should always be reported. --- src/lib/Guiguts/ErrorCheck.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Guiguts/ErrorCheck.pm b/src/lib/Guiguts/ErrorCheck.pm index d9c2984a..9a0b4c2b 100644 --- a/src/lib/Guiguts/ErrorCheck.pm +++ b/src/lib/Guiguts/ErrorCheck.pm @@ -575,11 +575,11 @@ sub errorcheckpop_up { } elsif ( $errorchecktype eq "Spell Query" ) { # Spell query also has a frequency count to append my $freq = spellqueryfrequency($line); - next if $freq > $::spellquerythreshold; # If it's spelled the same way several times, it's probably not an error if ( $line =~ s/\*\*\*$// ) { # Spelling flagged as bad word $line .= " *$freq*"; } else { - $line .= " ($freq)"; # Ordinary misspelling + next if $freq > $::spellquerythreshold; # If it's spelled the same way several times, it's probably not an error + $line .= " ($freq)"; # Ordinary misspelling } } elsif ( $errorchecktype eq "EPUBCheck" ) {