Skip to content

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

fix(core): add `on` to the list of special cases

Elijah Potterdaae5e981873
diff --git a/harper-core/src/linting/repeated_words.rs b/harper-core/src/linting/repeated_words.rs
index 61dd1bc24..015907110 100644
--- a/harper-core/src/linting/repeated_words.rs
+++ b/harper-core/src/linting/repeated_words.rs
@@ -16,6 +16,7 @@ impl RepeatedWords {
special_cases: vec![
smallvec!['i', 's'],
smallvec!['a'],
+ smallvec!['o', 'n'],
smallvec!['a', 'n', 'd'],
],
}
@@ -130,4 +131,13 @@ mod tests {
"And this is also a test",
);
}
+
+ #[test]
+ fn on_on_github() {
+ assert_suggestion_result(
+ "Take a look at the project on on GitHub.",
+ RepeatedWords::default(),
+ "Take a look at the project on GitHub.",
+ );
+ }
}