From 36d8dff150894d5123efec69fc6807f3e198256b Mon Sep 17 00:00:00 2001 From: Torben <59419684+entorb@users.noreply.github.com> Date: Sun, 17 Nov 2024 08:02:31 +0100 Subject: [PATCH] add start of quotation rule --- scripts/check_chapters.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/check_chapters.py b/scripts/check_chapters.py index d7b74aa3e..bf323664b 100755 --- a/scripts/check_chapters.py +++ b/scripts/check_chapters.py @@ -306,11 +306,17 @@ def fix_quotations(s: str) -> str: # noqa: C901, PLR0912, PLR0915 if settings["lang"] == "DE": s = re.sub(r"…„", r"… „", s) + # space at opening " + if settings["lang"] == "EN": + s = re.sub(r"“ +", r"“", s) + if settings["lang"] == "DE": + s = re.sub(r"„ +", r"„", s) + # space before closing “ if settings["lang"] == "EN": - s = re.sub(r" +”", r"” ", s) + s = re.sub(r" +”", r"”", s) if settings["lang"] == "DE": - s = re.sub(r" +“", r"“ ", s) + s = re.sub(r" +“", r"“", s) # space between "…" and "“" # if settings["lang"] == "EN":