From 19551b8c9fc7a028c1065e2012e5ce99b84ff981 Mon Sep 17 00:00:00 2001 From: AaronBenDaniel <144371000+AaronBenDaniel@users.noreply.github.com> Date: Thu, 29 May 2025 00:47:21 -0400 Subject: [PATCH] fix(api): Carry over paragraph styling (#67 - @AaronBenDaniel) --- src/api/src/create_book.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/src/create_book.py b/src/api/src/create_book.py index 8731b6e..8a90a0b 100644 --- a/src/api/src/create_book.py +++ b/src/api/src/create_book.py @@ -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