Skip to content

Commit

Permalink
add start of quotation rule
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Nov 17, 2024
1 parent 5c69e4f commit 36d8dff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/check_chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 36d8dff

Please sign in to comment.