Skip to content

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

feat: OTOH → on the other hand (#4313)

Andrew Dunbar1b0c82a38ef9
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index f85d5d3de..39f2a0e68 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -331,6 +331,13 @@
"label": "Oh My God"
}
},
+ {
+ "Bool": {
+ "name": "OnTheOtherHand",
+ "state": true,
+ "label": "On the Other Hand"
+ }
+ },
{
"Bool": {
"name": "PleaseTakeALook",
diff --git a/harper-core/src/linting/initialisms.rs b/harper-core/src/linting/initialisms.rs
index a82e91830..0cb81c330 100644
--- a/harper-core/src/linting/initialisms.rs
+++ b/harper-core/src/linting/initialisms.rs
@@ -36,6 +36,7 @@ pub fn lint_group() -> LintGroup {
"LetMeKnow" => ("lmk", &["let me know"]),
"NeverMind" => ("nvm", &["never mind"]),
"OhMyGod" => ("omg", &["oh my god"]),
+ "OnTheOtherHand" => ("otoh", &["on the other hand"]),
"PleaseTakeALook" => ("ptal", &["please take a look"]),
"Really" => ("rly", &["really"]),
"TalkToYouLater" => ("ttyl", &["talk to you later"]),
@@ -250,4 +251,13 @@ mod tests {
"As far as i can tell the other drivers of recent progress in LLMs have been: ploughing in lots and lots of specialised training data",
);
}
+
+ #[test]
+ fn corrects_otoh() {
+ assert_suggestion_result(
+ "\"Actual consequences\", OTOH, most directly relates to the camp(s) focused on \"embodiment\"",
+ lint_group(),
+ "\"Actual consequences\", On the other hand, most directly relates to the camp(s) focused on \"embodiment\"",
+ );
+ }
}