Skip to content

Commit

Permalink
[en] improve rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tiff committed Jul 17, 2024
1 parent 7555d7d commit 8a9ae30
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public List<String> getAdditionalSpellingFileNames() {
private static final Pattern WHEREEVER = compile("[Ww]hereever");
private static final Pattern WHATSAPP = compile("[Ww]hatsapp");
private static final Pattern JETLAGGED = compile("jetlagged");
private static final Pattern MACBOOK = compile("[Mm]acbooks?");
private static final Pattern LIKELYHOOD = compile("[Ll]ikelyhood");
private static final Pattern UNECESSARY = compile("[Uu]necessary");
private static final Pattern HUBSPOT = compile("[Hh]ubspot");
Expand Down Expand Up @@ -1535,6 +1536,7 @@ protected List<SuggestedReplacement> getOnlySuggestions(String word) {
if (WHEREEVER.matcher(word).matches()) return topMatch(word.replaceFirst("hereever", "herever"));
if (WHATSAPP.matcher(word).matches()) return topMatch("WhatsApp");
if (JETLAGGED.matcher(word).matches()) return topMatch("jet-lagged");
if (MACBOOK.matcher(word).matches()) return topMatch(word.replaceFirst("acbook", "acBook"));
if (LIKELYHOOD.matcher(word).matches()) return topMatch(word.replaceFirst("ikelyhood", "ikelihood"));
if (UNECESSARY.matcher(word).matches()) return topMatch(word.replaceFirst("necessary", "nnecessary"));
if (TV.matcher(word).matches()) {
Expand Down

0 comments on commit 8a9ae30

Please sign in to comment.