소스 검색

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 달 전
부모
커밋
6c4b2b0a8e
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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>