Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Dec 1, 2024
1 parent 15a2a65 commit 9988698
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/check_chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ def fix_spell(s: str) -> str:
# V2: using multiprocessing
# prepare
num_processes = min(cpu_count(), len(list_of_chapter_files))
pool = Pool(processes=num_processes)
# run
results = pool.map(process_file, list_of_chapter_files)
with Pool(processes=num_processes) as pool:
# run
results = pool.map(process_file, list_of_chapter_files)
any_issue_found = True in results

# V1: single processing
Expand Down
2 changes: 1 addition & 1 deletion scripts/ebook/step_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# not used in DE version

# \censor
cont = re.sub(r"\\censor\{.*?\}", r"xxxxxx", cont)
cont = re.sub(r"\\censor\{[^}]*\}", r"xxxxxx", cont)

# # remove Deathly_Hallows_Sign.pdf and other pdf images
# # \includegraphics[scale=0.125]{images/Deathly_Hallows_Sign.pdf}
Expand Down
2 changes: 1 addition & 1 deletion scripts/ebook/step_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def fix_ellipsis(s: str) -> str:
# 1. remove all spaces around ellipsis
s = re.sub(r" *… *", "…", s)
# 2. recreate some spaces
# before punctuation : no space, so governed by 1.
# before punctuation : no space, so covered by 1.
# between words
s = re.sub(r"(?<=[\w])…(?=[\w])", "… ", s)
# after punctuation: add space
Expand Down

0 comments on commit 9988698

Please sign in to comment.