Skip to content

Commit

Permalink
ebook: fixing stray </div> leftover
Browse files Browse the repository at this point in the history
hopefully fixing #187 (comment)
  • Loading branch information
entorb committed Feb 4, 2025
1 parent 783a3b0 commit 5e30093
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/ebook/step_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ def fix_ellipsis(s: str) -> str:
count=1,
)

# stray </div> leftover
cont = re.sub(
r"(https://github.com/rrthomas/hpmor/</a></p>)\s+</div>",
r"\1",
cont,
flags=re.DOTALL | re.IGNORECASE,
count=1,
)

# cleanup hp-intro leftovers
cont = re.sub(
"""<p>Fanfiction based on the characters of</p>
Expand Down

0 comments on commit 5e30093

Please sign in to comment.