Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: a break through → a breakthrough (#4380)
Andrew Dunbar81dbff3d55f4
diff --git a/harper-core/src/linting/compound_nouns/mod.rs b/harper-core/src/linting/compound_nouns/mod.rsindex d4b3de496..d8c7bf4ec 100644--- a/harper-core/src/linting/compound_nouns/mod.rs+++ b/harper-core/src/linting/compound_nouns/mod.rs@@ -14,7 +14,10 @@ pub(crate) fn is_content_word(tok: &Token, src: &[char]) -> bool {tok.span.len() > 1&& (meta.is_noun() || meta.is_adjective() || meta.is_verb() || meta.is_adverb())&& !(meta.is_determiner() || meta.is_conjunction())- && (!meta.preposition || tok.get_ch(src).eq_str("bar"))+ && (!meta.preposition+ || tok+ .get_ch(src)+ .eq_any_ignore_ascii_case_str(&["bar", "through"]))}pub(crate) fn predicate(@@ -384,4 +387,13 @@ mod tests {test_linter(),);}++ #[test]+ fn fix_big_break_through() {+ assert_suggestion_result(+ "I think a big break through is needed for AGI so I haven’t been worried about it.",+ test_linter(),+ "I think a big breakthrough is needed for AGI so I haven’t been worried about it.",+ )+ }}