Merge pull request #1146 from epage/aline

fix(dict): Prefer correcting alingment to alignment
This commit is contained in:
Ed Page 2024-11-06 09:08:08 -06:00 committed by GitHub
commit b0c364bcdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -2452,8 +2452,8 @@ alimunium,aluminium
aling,aline,along,ailing,sling aling,aline,along,ailing,sling
alinged,alined alinged,alined
alinging,aligning alinging,aligning
alingment,alinement alingment,alignment
alingments,alinements alingments,alignments
alings,alines,slings alings,alines,slings
alinment,alignment alinment,alignment
alinments,alignments alinments,alignments

Can't render this file because it is too large.

View file

@ -225440,8 +225440,8 @@ pub static WORD_ALI_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict
&["aline", "along", "ailing", "sling"], &["aline", "along", "ailing", "sling"],
&["alined"], &["alined"],
&["aligning"], &["aligning"],
&["alinement"], &["alignment"],
&["alinements"], &["alignments"],
&["alines", "slings"], &["alines", "slings"],
&["alignment"], &["alignment"],
&["alignments"], &["alignments"],

View file

@ -227,7 +227,7 @@ fn find_best_match<'c>(
#[allow(clippy::single_match)] #[allow(clippy::single_match)]
match (typo, correction) { match (typo, correction) {
// Picking the worst option due to a letter swap being an edit distance of two // Picking the worst option due to a letter swap being an edit distance of two
("alinging", "aligning") => { ("alinging", "aligning") | ("alingment", "alignment") | ("alingments", "alignments") => {
return None; return None;
} }
_ => {} _ => {}