Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: ahead an→ahead and (#1591)
Andrew Dunbare68c736a5a12
diff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rsindex 58a70288d..67429915f 100644--- a/harper-core/src/linting/phrase_corrections/mod.rs+++ b/harper-core/src/linting/phrase_corrections/mod.rs@@ -46,6 +46,12 @@ pub fn lint_group() -> LintGroup {"When describafterg a timeframe, use `a while`.","Corrects the missing article after `after while` or `after awhile`, forming `after a while`."),+ "AheadAnd" => (+ ["ahead an"],+ ["ahead and"],+ "Did you make a typo? Shouldn't it be `and`?",+ "Corrects `an` to `and` after `ahead`."+ ),"AllOfASudden" => (["all of the sudden"],["all of a sudden"],diff --git a/harper-core/src/linting/phrase_corrections/tests.rs b/harper-core/src/linting/phrase_corrections/tests.rsindex 7fbfe78f0..9c2c92224 100644--- a/harper-core/src/linting/phrase_corrections/tests.rs+++ b/harper-core/src/linting/phrase_corrections/tests.rs@@ -25,6 +25,16 @@ fn correct_after_while() {);}+// AheadAnd+#[test]+fn correct_ahead_and() {+ assert_suggestion_result(+ "If it's important, go ahead an open an issue.",+ lint_group(),+ "If it's important, go ahead and open an issue.",+ );+}+// AllOfASudden#[test]fn corrects_all_of_a_sudden() {