From 882d8f4ce17951b117110a5a1335be58b5e1a4a5 Mon Sep 17 00:00:00 2001 From: Luis Malhadas <93918064+LuisMalhadas@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:49:53 +0100 Subject: [PATCH] solves the lack of line breaks in chat download as pdf #8405 --- backend/open_webui/utils/pdf_generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/open_webui/utils/pdf_generator.py b/backend/open_webui/utils/pdf_generator.py index bbaf42dbb..1bb9f76b3 100644 --- a/backend/open_webui/utils/pdf_generator.py +++ b/backend/open_webui/utils/pdf_generator.py @@ -53,6 +53,7 @@ class PDFGenerator: # - https://facelessuser.github.io/pymdown-extensions/usage_notes/ # html_content = markdown(content, extensions=["pymdownx.extra"]) + content = content.replace("\n", "
") html_message = f"""