Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(core): ensure `hes` is corrected properly
Elijah Potterc66e404dc196
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dictindex 1ec083553..42b3081b8 100644--- a/harper-core/dictionary.dict+++ b/harper-core/dictionary.dict@@ -27163,7 +27163,7 @@ gyrofrequency/NgSgyroscope/NgSgyroscopic/Jgyve/NVgGdS-h/~NVJnSXZGvz # removed `>` 'her' is not comparative of 'h'+h/~NVJnXZGvz # removed `>` 'her' is not comparative of 'h'h'm/ha/~haberdasher/NSgdiff --git a/harper-core/src/linting/spell_check.rs b/harper-core/src/linting/spell_check.rsindex 3625f4086..a963ed114 100644--- a/harper-core/src/linting/spell_check.rs+++ b/harper-core/src/linting/spell_check.rs@@ -387,4 +387,22 @@ mod tests {0,);}++ #[test]+ fn corrects_hes() {+ assert_suggestion_result(+ "hes",+ SpellCheck::new(FstDictionary::curated(), Dialect::British),+ "he's",+ );+ }++ #[test]+ fn corrects_shes() {+ assert_suggestion_result(+ "shes",+ SpellCheck::new(FstDictionary::curated(), Dialect::British),+ "she's",+ );+ }}diff --git a/harper-core/tests/text/linters/Computer science.snap.yml b/harper-core/tests/text/linters/Computer science.snap.ymlindex bb1c97b47..30cd1a4f8 100644--- a/harper-core/tests/text/linters/Computer science.snap.yml+++ b/harper-core/tests/text/linters/Computer science.snap.yml@@ -773,8 +773,8 @@ Message: |216 | that they are theory, abstraction (modeling), and design. Amnon H. Eden| ^~ Did you mean to spell `H.` this way?Suggest:- - Replace with: “Hi”- - Replace with: “Ha”+ - Replace with: “Ht”+ - Replace with: “H”- Replace with: “He”