Skip to content

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

feat(core): address further #720 edge case

Elijah Potter29b9361e8941
diff --git a/harper-core/src/linting/then_than.rs b/harper-core/src/linting/then_than.rs
index 77165a929..6328eb8c1 100644
--- a/harper-core/src/linting/then_than.rs
+++ b/harper-core/src/linting/then_than.rs
@@ -26,7 +26,7 @@ impl ThenThan {
.then(Invert::new(AnyCapitalization::new(char_string!("that")))),
),
// Denotes exceptions to the rule.
- Box::new(Invert::new(WordSet::new(&["back", "this", "so"]))),
+ Box::new(Invert::new(WordSet::new(&["back", "this", "so", "but"]))),
])),
}
}
@@ -190,6 +190,12 @@ mod tests {
ThenThan::default(),
0,
);
+
+ assert_lint_count(
+ "He was always a top student in school but then his argument is that grades don't define intelligence.",
+ ThenThan::default(),
+ 0,
+ );
}
#[test]