Skip to content

Commit

Permalink
fix(core): pronouns weren't the problem, it was the dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 22, 2025
1 parent f56eecd commit 5b1a906
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion harper-core/dictionary.dict
Original file line number Diff line number Diff line change
Expand Up @@ -49457,7 +49457,7 @@ you'd/
you'll/
you're/
you've/
you/841SMH~
you/84SMH~
young/514TMR
youngish/5
youngster/1MS
Expand Down
11 changes: 10 additions & 1 deletion harper-core/src/linting/plural_conjugate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl Default for PluralConjugate {

let non_plural_case = SequencePattern::default()
.then(Box::new(|tok: &Token, _source: &[char]| {
tok.kind.is_not_plural_noun() && tok.kind.is_noun() && !tok.kind.is_pronoun()
tok.kind.is_not_plural_noun() && tok.kind.is_noun()
}))
.then_whitespace()
.then_exact_word("are");
Expand Down Expand Up @@ -100,4 +100,13 @@ mod tests {
0,
);
}

#[test]
fn pronoun_singular() {
assert_suggestion_result(
"If he are testing it.",
PluralConjugate::default(),
"If he is testing it.",
);
}
}

0 comments on commit 5b1a906

Please sign in to comment.