Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: per say / per-se → per se (#2258)
Andrew Dunbard7aa2837596a
diff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rsindex 2a1ef951b..f8202ae92 100644--- a/harper-core/src/linting/phrase_corrections/mod.rs+++ b/harper-core/src/linting/phrase_corrections/mod.rs@@ -866,6 +866,13 @@ pub fn lint_group() -> LintGroup {"Corrects `piece of mind` to `peace of mind`.",LintKind::Eggcorn),+ "PerSe" => (+ ["per say", "per-se", "per-say"],+ ["per se"],+ "The correct spelling is `per se` (with no hyphen)",+ "Corrects common misspellings of `per se`.",+ LintKind::Spelling+ ),"PointsOfView" => (["point of views"],["points of view"],diff --git a/harper-core/src/linting/phrase_corrections/tests.rs b/harper-core/src/linting/phrase_corrections/tests.rsindex 7a67a1ab7..89305819e 100644--- a/harper-core/src/linting/phrase_corrections/tests.rs+++ b/harper-core/src/linting/phrase_corrections/tests.rs@@ -1444,6 +1444,34 @@ fn corrects_piece_of_mind() {)}+// PerSe+#[test]+fn corrects_per_se_hyphenated() {+ assert_suggestion_result(+ "It's not a problem per-se, but it would make the desktop more consistent when using QT and KDE apps.",+ lint_group(),+ "It's not a problem per se, but it would make the desktop more consistent when using QT and KDE apps.",+ )+}++#[test]+fn corrects_per_say() {+ assert_suggestion_result(+ "Hi all - not really an issue per say, but more of a request for some suggestions and guidance.",+ lint_group(),+ "Hi all - not really an issue per se, but more of a request for some suggestions and guidance.",+ );+}++#[test]+fn corrects_per_say_hyphenated() {+ assert_suggestion_result(+ "Whilst I don't think this is wrong per-say, I'm not confident it is necessary.",+ lint_group(),+ "Whilst I don't think this is wrong per se, I'm not confident it is necessary.",+ );+}+// PointsOfView#[test]fn corrects_points_of_view() {