Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix(core): address false-positives by adding an exception for verbs (#2179)

Elijah Potter9f331b4fff59
diff --git a/harper-core/src/linting/its_possessive.rs b/harper-core/src/linting/its_possessive.rs
index 1924daf73..34d209d20 100644
--- a/harper-core/src/linting/its_possessive.rs
+++ b/harper-core/src/linting/its_possessive.rs
@@ -47,6 +47,7 @@ impl Default for ItsPossessive {
.then(UPOSSet::new(&[UPOS::ADJ, UPOS::NOUN, UPOS::PROPN]))
.t_ws()
.then_unless(UPOSSet::new(&[
+ UPOS::VERB,
UPOS::PART,
UPOS::ADP,
UPOS::NOUN,
@@ -322,4 +323,12 @@ mod tests {
ItsPossessive::default(),
);
}
+
+ #[test]
+ fn allow_issue_2001() {
+ assert_no_lints(
+ "It's worth highlighting that while using a fork instead of a spoon is easy, it sometimes isn't.",
+ ItsPossessive::default(),
+ );
+ }
}