Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix(core): issue #662

Elijah Potterd2ac92502cc1
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dict
index 3ce7cbba9..241a87835 100644
--- a/harper-core/dictionary.dict
+++ b/harper-core/dictionary.dict
@@ -10768,7 +10768,8 @@ Zworykin/M
Zyrtec/M
Zyuganov/M
Zzz
-a/-+457S~
+a/-+457~
+as/j
aah/14
aardvark/1SM
ab/14+SDY
diff --git a/harper-core/src/linting/compound_nouns/general_compound_nouns.rs b/harper-core/src/linting/compound_nouns/general_compound_nouns.rs
index 02b6ca2f7..9f560cc62 100644
--- a/harper-core/src/linting/compound_nouns/general_compound_nouns.rs
+++ b/harper-core/src/linting/compound_nouns/general_compound_nouns.rs
@@ -11,6 +11,7 @@ use crate::{
Lrc, Token,
};
+/// Covers the general cases of accidentally split compound nouns.
pub struct GeneralCompoundNouns {
pattern: Box<dyn Pattern>,
split_pattern: Lrc<SplitCompoundWord>,
diff --git a/harper-core/src/linting/compound_nouns/mod.rs b/harper-core/src/linting/compound_nouns/mod.rs
index 465a948a9..86f8d0780 100644
--- a/harper-core/src/linting/compound_nouns/mod.rs
+++ b/harper-core/src/linting/compound_nouns/mod.rs
@@ -262,4 +262,13 @@ mod tests {
fn got_is_not_possessive() {
assert_lint_count("I got here by car...", CompoundNouns::default(), 0);
}
+
+ #[test]
+ fn allow_issue_662() {
+ assert_lint_count(
+ "They are as old as *modern* computers ",
+ CompoundNouns::default(),
+ 0,
+ );
+ }
}