Skip to content

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

Address "one" for indefinite article rule

Clay Dugo5e963042ed90
diff --git a/harper-core/src/linting/an_a.rs b/harper-core/src/linting/an_a.rs
index fe1b0bb37..a0a11ea66 100644
--- a/harper-core/src/linting/an_a.rs
+++ b/harper-core/src/linting/an_a.rs
@@ -103,6 +103,7 @@ fn starts_with_vowel(word: &[char]) -> bool {
[] | ['u', 'k', ..]
| ['e', 'u', 'p', 'h', ..]
| ['e', 'u', 'g' | 'l' | 'c', ..]
+ | ['o', 'n', 'e']
| ['o', 'n', 'c', 'e']
) {
return false;
diff --git a/harper-core/tests/run_tests.rs b/harper-core/tests/run_tests.rs
index eece70c26..cad2ea4d0 100644
--- a/harper-core/tests/run_tests.rs
+++ b/harper-core/tests/run_tests.rs
@@ -44,3 +44,4 @@ create_test!(chinese_lorem_ipsum.md, 2);
create_test!(obsidian_links.md, 2);
create_test!(issue_267.md, 0);
create_test!(proper_noun_capitalization.md, 2);
+create_test!(article_usage.md, 0);
diff --git a/harper-core/tests/test_sources/article_usage.md b/harper-core/tests/test_sources/article_usage.md
new file mode 100644
index 000000000..297cb520d
--- /dev/null
+++ b/harper-core/tests/test_sources/article_usage.md
@@ -0,0 +1 @@
+The total number of pixels in the image pertains to a one channel image.