From 360b49432c8f7a4557bd84efac88136a82b8df78 Mon Sep 17 00:00:00 2001 From: Nigel Date: Sun, 9 Aug 2026 16:21:52 +0100 Subject: [PATCH 1/3] Add `"T`/`"I` and `T'm`/`I'm`, etc to CP Filter Under the "2/3 letter scannos" sub-toggle, change capital "T" to "I" for some common words, and for standalone "T" following double quotes. Fixes #1921 --- src/guiguts/content_providing.py | 6 ++++++ src/guiguts/data/cp_files/scannos.json | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/guiguts/content_providing.py b/src/guiguts/content_providing.py index c7a0654f..9b777cde 100644 --- a/src/guiguts/content_providing.py +++ b/src/guiguts/content_providing.py @@ -1103,6 +1103,8 @@ def repl_sub(m: re.Match[str]) -> str: re_exc2 = re.compile(r"'!!") re_h = re.compile(r"!!(?=\w)") re_exc = re.compile(r"(?<=\w)!(?=\w)") + re_ti = re.compile(r"\bT('ll|'m|'d|f|s|t)\b") + re_tiw = re.compile(r'"T\b') re_1i = re.compile(r"(? I key = PrefKey.CP_1_TO_I diff --git a/src/guiguts/data/cp_files/scannos.json b/src/guiguts/data/cp_files/scannos.json index 8496701c..f37daa9b 100644 --- a/src/guiguts/data/cp_files/scannos.json +++ b/src/guiguts/data/cp_files/scannos.json @@ -805,7 +805,6 @@ "carth" : "earth", "eartb" : "earth", "eartli" : "earth", - "casc" : "ease", "casily" : "easily", "easilv" : "easily", "eastem" : "eastern", @@ -3088,7 +3087,6 @@ "mbber" : "rubber", "mde" : "rude", "mle" : "rule", - "mn" : "run", "mral" : "rural", "msh" : "rush", "mst" : "rust" From 816ac419913fc4927665a14865225d4917515802 Mon Sep 17 00:00:00 2001 From: Nigel Date: Tue, 11 Aug 2026 09:54:19 +0100 Subject: [PATCH 2/3] Fixed bug in regex replacement --- src/guiguts/content_providing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guiguts/content_providing.py b/src/guiguts/content_providing.py index 9b777cde..0e5fd392 100644 --- a/src/guiguts/content_providing.py +++ b/src/guiguts/content_providing.py @@ -1313,7 +1313,7 @@ def add_to_changes( add_to_changes(key, "Scanno non-word-end !! → H", cnt, linenum) line, cnt = re_exc.subn("l", line) # ! to l if midword add_to_changes(key, "Scanno mid-word ! → l", cnt, linenum) - line, cnt = re_ti.subn("I", line) # T to I for T'm, T'll, etc. + line, cnt = re_ti.subn(r"I\1", line) # T to I for T'm, T'll, etc. add_to_changes(key, "Scanno T' → I'", cnt, linenum) line, cnt = re_tiw.subn('"I', line) # "T\b to "I add_to_changes(key, 'Scanno "T → "I', cnt, linenum) From 58670608c4c0fa023d38b1250e1d89cead12a223 Mon Sep 17 00:00:00 2001 From: Nigel Date: Tue, 11 Aug 2026 20:13:55 +0100 Subject: [PATCH 3/3] Accept curly quotes for `T'd`/`I'd`, `"T `/`"I ` etc --- src/guiguts/content_providing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guiguts/content_providing.py b/src/guiguts/content_providing.py index 0e5fd392..26cefcc4 100644 --- a/src/guiguts/content_providing.py +++ b/src/guiguts/content_providing.py @@ -1103,8 +1103,8 @@ def repl_sub(m: re.Match[str]) -> str: re_exc2 = re.compile(r"'!!") re_h = re.compile(r"!!(?=\w)") re_exc = re.compile(r"(?<=\w)!(?=\w)") - re_ti = re.compile(r"\bT('ll|'m|'d|f|s|t)\b") - re_tiw = re.compile(r'"T\b') + re_ti = re.compile(r"\bT(['’]ll|['’]m|['’]d|f|s|t)\b") + re_tiw = re.compile(r'(["“])T\b') re_1i = re.compile(r"(? I