Skip to content

Commit

Permalink
PEP0 transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed May 16, 2020
1 parent 9e47690 commit 4f143ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
soup = BeautifulSoup(file_path.read_text(encoding="UTF8"), 'lxml')
contents = soup.find('div', class_="body").div

# Handle PEP 0
if int(file_path.stem[-4:]) == 0:
[tag.p.unwrap() if tag.p else tag for tag in contents.findAll("th")]
[tag.p.unwrap() if tag.p else tag for tag in contents.findAll("td")]

# Removes <p> tags from list item elements
for tag in contents.findAll("li"):
try:
Expand Down

0 comments on commit 4f143ae

Please sign in to comment.