From af3fdb2fe06d8d36114886fa8a018616d2149d6b Mon Sep 17 00:00:00 2001 From: Naiyer <19614213+naiyerasif@users.noreply.github.com> Date: Sun, 31 Mar 2024 11:33:37 +0530 Subject: [PATCH] feat(rule): preferred alternatives - phone --- Prim/PreferredAlternatives.yml | 1 + test/fixtures/PreferredAlternatives/test.md | 4 ++++ test/snapshots/PreferredAlternatives.log | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Prim/PreferredAlternatives.yml b/Prim/PreferredAlternatives.yml index d087693..4e4ad99 100644 --- a/Prim/PreferredAlternatives.yml +++ b/Prim/PreferredAlternatives.yml @@ -14,3 +14,4 @@ swap: anti-virus: antivirus chat ?bot?: chatbot open-source: open source + (?:cell ?phone|smart ?phone): phone|mobile phone diff --git a/test/fixtures/PreferredAlternatives/test.md b/test/fixtures/PreferredAlternatives/test.md index 05a348a..f66c2e7 100644 --- a/test/fixtures/PreferredAlternatives/test.md +++ b/test/fixtures/PreferredAlternatives/test.md @@ -27,3 +27,7 @@ She used a chat bot to proofread her paper. I contributed a new feature to an open-source project. + + +Have you seen my cell phone? +My smartphone is running low on battery. diff --git a/test/snapshots/PreferredAlternatives.log b/test/snapshots/PreferredAlternatives.log index 7057191..34c1d19 100644 --- a/test/snapshots/PreferredAlternatives.log +++ b/test/snapshots/PreferredAlternatives.log @@ -7,4 +7,6 @@ test.md:17:12:Prim.PreferredAlternatives:Prefer using 'antimalware' over 'anti-m test.md:20:36:Prim.PreferredAlternatives:Prefer using 'antispyware' over 'anti-spyware'. test.md:23:16:Prim.PreferredAlternatives:Prefer using 'antivirus' over 'anti-virus'. test.md:26:12:Prim.PreferredAlternatives:Prefer using 'chatbot' over 'chat bot'. -test.md:29:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'. \ No newline at end of file +test.md:29:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'. +test.md:32:18:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'cell phone'. +test.md:33:4:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'smartphone'. \ No newline at end of file