Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: peak behind the curtain→peek behind the curtain (#2635)
Andrew Dunbard6c36c709f17
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex 93f667877..3510c160f 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -365,6 +365,17 @@ pub fn lint_group() -> LintGroup {"Corrects `passerbys` and `passer-bys` to `passersby` or `passers-by`.",LintKind::Grammar),+ "PeeekBehindTheCurtain" => (+ &[+ ("peak behind the curtain", "peek behind the curtain"),+ ("peaked behind the curtain", "peeked behind the curtain"),+ ("peaking behind the curtain", "peeking behind the curtain"),+ ("peaks behind the curtain", "peeks behind the curtain"),+ ],+ "The correct idiom is `peek behind the curtain`.",+ "Corrects `peak behind the curtain` to `peek behind the curtain`.",+ LintKind::Eggcorn+ ),"Piggyback" => (&[("piggy bag", "piggyback"),diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rsindex 23bd8f9a9..fe58ce0c9 100644--- a/harper-core/src/linting/phrase_set_corrections/tests.rs+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs@@ -1005,6 +1005,44 @@ fn correct_passer_bys_hyphen() {);}+// PeekBehindTheCurtain++#[test]+fn fix_peak() {+ assert_suggestion_result(+ "Offer a peak behind the curtain of what I look for when baselining a software installation.",+ lint_group(),+ "Offer a peek behind the curtain of what I look for when baselining a software installation.",+ );+}++#[test]+fn fix_peaked() {+ assert_suggestion_result(+ "I peaked behind the curtain of the new Autodraw tool and noticed some expected similarities to what I saw in Quickdraw.",+ lint_group(),+ "I peeked behind the curtain of the new Autodraw tool and noticed some expected similarities to what I saw in Quickdraw.",+ );+}++#[test]+fn fix_peaking() {+ assert_suggestion_result(+ "I can see how peaking behind the curtain got me to where I am today.",+ lint_group(),+ "I can see how peeking behind the curtain got me to where I am today.",+ );+}++#[test]+fn fix_peaks() {+ assert_suggestion_result(+ "The Daily Vlog Series that peaks behind the curtain of an Entrepreneur's day to day life in 2016 building a business.",+ lint_group(),+ "The Daily Vlog Series that peeks behind the curtain of an Entrepreneur's day to day life in 2016 building a business.",+ );+}+// Piggyback// -none-