Skip to content

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

feat(core): cover case from #381 + remove useless rule (#1416)

Elijah Potter112291049637
diff --git a/harper-core/src/linting/its_contraction.rs b/harper-core/src/linting/its_contraction.rs
index 9e29c8455..81bfbdfbc 100644
--- a/harper-core/src/linting/its_contraction.rs
+++ b/harper-core/src/linting/its_contraction.rs
@@ -21,7 +21,7 @@ impl Default for ItsContraction {
let positive = SequenceExpr::default()
.t_aco("its")
.then_whitespace()
- .then(UPOSSet::new(&[UPOS::VERB, UPOS::AUX]));
+ .then(UPOSSet::new(&[UPOS::VERB, UPOS::AUX, UPOS::DET]));
let exceptions = SequenceExpr::default()
.then_anything()
@@ -129,4 +129,13 @@ mod tests {
0,
);
}
+
+ #[test]
+ fn issue_381() {
+ assert_suggestion_result(
+ "Its a nice day.",
+ ItsContraction::default(),
+ "It's a nice day.",
+ );
+ }
}
diff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rs
index 1f0c825af..70f02606b 100644
--- a/harper-core/src/linting/phrase_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_corrections/mod.rs
@@ -1293,12 +1293,6 @@ pub fn lint_group() -> LintGroup {
"Did you mean `will contain`?",
"Incorrect verb form: `will` should be followed by the base form `contain`."
),
- "WorldWarII" => (
- ["world war 2", "world war ii", "world war ii", "world war ii", "world war ii"],
- ["World War II"],
- "Use the correct capitalization for `World War II`.",
- "Ensures `World War II` is correctly capitalized."
- ),
"WorseAndWorse" => (
["worst and worst", "worse and worst", "worst and worse"],
["worse and worse"],