mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
fix: pdf issue w/ markdown
This commit is contained in:
parent
25a2c6ee52
commit
bcf88585de
@ -54,17 +54,17 @@ class PDFGenerator:
|
||||
html_content = markdown(content, extensions=["pymdownx.extra"])
|
||||
|
||||
html_message = f"""
|
||||
<div> {date_str} </div>
|
||||
<div class="message">
|
||||
<small> {date_str} </small>
|
||||
<div>
|
||||
<h2>
|
||||
<strong>{role.title()}</strong>
|
||||
<small class="text-muted">{model}</small>
|
||||
<span style="font-size: 12px; color: #888;">{model}</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="markdown-section">
|
||||
{html_content}
|
||||
</div>
|
||||
<pre class="markdown-section">
|
||||
{content}
|
||||
</pre>
|
||||
</div>
|
||||
"""
|
||||
return html_message
|
||||
|
Loading…
Reference in New Issue
Block a user