From 581b88983f02a79d7d58c2babcf02d67b786e23e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:29:13 -0500 Subject: [PATCH] Warn about Cyrillic homoglyphs --- .github/actions/spelling/line_forbidden.patterns | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/spelling/line_forbidden.patterns b/.github/actions/spelling/line_forbidden.patterns index 5cd0cfe2..bf7777ea 100644 --- a/.github/actions/spelling/line_forbidden.patterns +++ b/.github/actions/spelling/line_forbidden.patterns @@ -256,6 +256,14 @@ # Should be `(coarse|fine)-grained` \b(?:coarse|fine) grained\b +# Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y` +# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this. +(?<=[A-Z]{2})[AВСЕНІӀЈКМОРЅТУ]|[AВСЕНІӀЈКМОРЅТУ](?=[A-Z]+(?:\b|[a-z]+)|[a-z]+(?:[^a-z]|$)) + +# Homoglyph (Cyrillic) should be `a`/`b`/`e` +# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this. +[аве](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[аве]|(?<=[A-Za-z])[аве](?=[A-Za-z]) + # Should be `neither/nor` -- or reword (?!