Skip to content

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

feat: AIUI → as I understand it (#4553)

Andrew Dunbar17a6eb452006
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index f8d95a1f4..6ef668edf 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -212,6 +212,13 @@
"label": "As Far As I Know"
}
},
+ {
+ "Bool": {
+ "name": "AsIUnderstandIt",
+ "state": true,
+ "label": "As I Understand it"
+ }
+ },
{
"Bool": {
"name": "AsSoonAsPossible",
diff --git a/harper-core/src/linting/initialisms.rs b/harper-core/src/linting/initialisms.rs
index 54d0b1e79..f6b981014 100644
--- a/harper-core/src/linting/initialisms.rs
+++ b/harper-core/src/linting/initialisms.rs
@@ -19,6 +19,7 @@ pub fn lint_group() -> LintGroup {
add_initialism_mappings!(group, {
"AsFarAsICanTell" => ("afaict", &["as far as I can tell"]),
"AsFarAsIKnow" => ("afaik", &["as far as I know"]),
+ "AsIUnderstandIt" => ("aiui", &["as I understand it"]),
"AsSoonAsPossible" => ("asap", &["as soon as possible"]),
"BeRightBack" => ("brb", &["be right back"]),
"ByTheWay" => ("btw", &["by the way"]),
@@ -270,4 +271,13 @@ mod tests {
"The Oracle Linux OpenBLAS build isnt detected ootb, and it doesn't perform well compared to x86 for some reason.",
);
}
+
+ #[test]
+ fn corrects_aaui() {
+ assert_suggestion_result(
+ "AIUI, in the US something that's entirely machine-generated is not eligible for copyright protection.",
+ lint_group(),
+ "As i understand it, in the US something that's entirely machine-generated is not eligible for copyright protection.",
+ );
+ }
}