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_content = markdown(content, extensions=["pymdownx.extra"])
|
||||||
|
|
||||||
html_message = f"""
|
html_message = f"""
|
||||||
|
<div> {date_str} </div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<small> {date_str} </small>
|
|
||||||
<div>
|
<div>
|
||||||
<h2>
|
<h2>
|
||||||
<strong>{role.title()}</strong>
|
<strong>{role.title()}</strong>
|
||||||
<small class="text-muted">{model}</small>
|
<span style="font-size: 12px; color: #888;">{model}</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-section">
|
<pre class="markdown-section">
|
||||||
{html_content}
|
{content}
|
||||||
</div>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
return html_message
|
return html_message
|
||||||
|
Loading…
Reference in New Issue
Block a user