mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Add italics to *actions*
This commit is contained in:
parent
56be7149aa
commit
cf0cdae9c6
@ -220,6 +220,11 @@ def generate_chat_html(history, name1, name2):
|
|||||||
img = ''
|
img = ''
|
||||||
|
|
||||||
for row in history[::-1]:
|
for row in history[::-1]:
|
||||||
|
row = list(row)
|
||||||
|
row[0] = re.sub(r"[\\]*\*", r"*", row[0])
|
||||||
|
row[1] = re.sub(r"[\\]*\*", r"*", row[1])
|
||||||
|
row[0] = re.sub(r"(\*)([^\*]*)(\*)", r"<em>\2</em>", row[0])
|
||||||
|
row[1] = re.sub(r"(\*)([^\*]*)(\*)", r"<em>\2</em>", row[1])
|
||||||
p = '\n'.join([f"<p>{x}</p>" for x in row[1].split('\n')])
|
p = '\n'.join([f"<p>{x}</p>" for x in row[1].split('\n')])
|
||||||
output += f"""
|
output += f"""
|
||||||
<div class="message">
|
<div class="message">
|
||||||
|
Loading…
Reference in New Issue
Block a user