Browse Source

Merge pull request #8407 from LuisMalhadas/no_line_break_pdf(#8405)

fix: solves the lack of line breaks in chat download as pdf #8405
Timothy Jaeryang Baek 3 months ago
parent
commit
6c4b2b0a8e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      backend/open_webui/utils/pdf_generator.py

+ 1 - 0
backend/open_webui/utils/pdf_generator.py

@@ -53,6 +53,7 @@ class PDFGenerator:
         # - https://facelessuser.github.io/pymdown-extensions/usage_notes/
         # - https://facelessuser.github.io/pymdown-extensions/usage_notes/
         # html_content = markdown(content, extensions=["pymdownx.extra"])
         # html_content = markdown(content, extensions=["pymdownx.extra"])
 
 
+        content = content.replace("\n", "<br/>")
         html_message = f"""
         html_message = f"""
             <div>
             <div>
                 <div>
                 <div>