Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dict): Prefer correcting alingment to alignment #1146

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions crates/typos-dict/src/word_codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225440,8 +225440,8 @@ pub static WORD_ALI_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict
&["aline", "along", "ailing", "sling"],
&["alined"],
&["aligning"],
&["alinement"],
&["alinements"],
&["alignment"],
&["alignments"],
&["alines", "slings"],
&["alignment"],
&["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
Loading