fix(api): Carry over paragraph styling (#67 - @AaronBenDaniel)

This commit is contained in:
AaronBenDaniel
2025-05-29 00:47:21 -04:00
committed by GitHub
parent 8ce6720098
commit 19551b8c9f
+4
View File
@@ -152,6 +152,10 @@ def generate_clean_part_html(part: Part, content: str) -> bs4.Tag:
for child in html.find_all("p"):
current_paragraph = clean.new_tag("p")
# Attempt to carry over paragraph styling
current_paragraph["style"] = child.get("style", "text-align: left;")
for p_child in list(child.children):
if not p_child:
continue