Skip to content

Commit

Permalink
fix(dict): Prefer correcting alingment to alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 5, 2024
1 parent 5998867 commit 6b079ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/typos-dict/assets/words.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2452,8 +2452,8 @@ alimunium,aluminium
aling,aline,along,ailing,sling
alinged,alined
alinging,aligning
alingment,alinement
alingments,alinements
alingment,alignment
alingments,alignments
alings,alines,slings
alinment,alignment
alinments,alignments
Expand Down
2 changes: 1 addition & 1 deletion crates/typos-dict/tests/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ fn find_best_match<'c>(
#[allow(clippy::single_match)]
match (typo, correction) {
// 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;
}
_ => {}
Expand Down

0 comments on commit 6b079ae

Please sign in to comment.