Skip to content

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

fix: make modal-of linter case insensitive

hippietrail58a1291e979d
diff --git a/harper-core/src/linting/modal_of.rs b/harper-core/src/linting/modal_of.rs
index 308e4c5d8..a5d897fa0 100644
--- a/harper-core/src/linting/modal_of.rs
+++ b/harper-core/src/linting/modal_of.rs
@@ -25,14 +25,10 @@ impl Default for ModalOf {
SequencePattern::default()
.then(words)
.then_whitespace()
- .then_exact_word("of"),
+ .t_aco("of"),
);
- let ws_course = Lrc::new(
- SequencePattern::default()
- .then_whitespace()
- .then_exact_word("course"),
- );
+ let ws_course = Lrc::new(SequencePattern::default().then_whitespace().t_aco("course"));
let modal_of_course = Lrc::new(
SequencePattern::default()
@@ -44,9 +40,9 @@ impl Default for ModalOf {
SequencePattern::default()
.then_any_word()
.then_whitespace()
- .then_exact_word("might")
+ .t_aco("might")
.then_whitespace()
- .then_exact_word("of"),
+ .t_aco("of"),
);
let anyword_might_of_course = Lrc::new(