Skip to content

Commit

Permalink
Don't skip bad words in Spell Query
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
windymilla committed Nov 24, 2023
1 parent b877758 commit 18629c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Guiguts/ErrorCheck.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) {
Expand Down

0 comments on commit 18629c8

Please sign in to comment.