Explorar o código

solves the lack of line breaks in chat download as pdf #8405

Luis Malhadas hai 4 meses
pai
achega
882d8f4ce1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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/
         # html_content = markdown(content, extensions=["pymdownx.extra"])
 
+        content = content.replace("\n", "<br/>")
         html_message = f"""
             <div>
                 <div>