Skip to content

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

feat: tho→though (#3526)

Andrew Dunbar279a53f3f832
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index c69e2a291..e61685bad 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -2983,6 +2983,13 @@
"label": "Expand Previous"
}
},
+ {
+ "Bool": {
+ "name": "ExpandThough",
+ "state": true,
+ "label": "Expand Though"
+ }
+ },
{
"Bool": {
"name": "ExpandThrough",
diff --git a/harper-core/src/linting/weir_rules/ExpandThough.weir b/harper-core/src/linting/weir_rules/ExpandThough.weir
new file mode 100644
index 000000000..40d6fbe16
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/ExpandThough.weir
@@ -0,0 +1,9 @@
+expr main (tho)
+
+let message "Use `though` instead of `tho`"
+let description "Expands the informal spelling `tho` to the standard word `though`."
+let kind "Style"
+let becomes "though"
+
+test "When i press the f8 key, it pause emulation, even tho the bind is not present at all" "When i press the f8 key, it pause emulation, even though the bind is not present at all"
+test "I'm not sure what to say tho, it does work generally" "I'm not sure what to say though, it does work generally"