Skip to content

Commit 4f143ae

Browse files
committed
PEP0 transforms
1 parent 9e47690 commit 4f143ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

package.py

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
soup = BeautifulSoup(file_path.read_text(encoding="UTF8"), 'lxml')
1818
contents = soup.find('div', class_="body").div
1919

20+
# Handle PEP 0
21+
if int(file_path.stem[-4:]) == 0:
22+
[tag.p.unwrap() if tag.p else tag for tag in contents.findAll("th")]
23+
[tag.p.unwrap() if tag.p else tag for tag in contents.findAll("td")]
24+
2025
# Removes <p> tags from list item elements
2126
for tag in contents.findAll("li"):
2227
try:

0 commit comments

Comments
 (0)