Fix the regex...
This commit is contained in:
parent
8d4170826f
commit
c4f7a874d5
1 changed files with 2 additions and 2 deletions
|
@ -236,8 +236,8 @@ def generate_chat_html(history, name1, name2, character):
|
||||||
for i,row in enumerate(history[::-1]):
|
for i,row in enumerate(history[::-1]):
|
||||||
row[0] = re.sub(r"[\\]*\*", r"*", row[0])
|
row[0] = re.sub(r"[\\]*\*", r"*", row[0])
|
||||||
row[1] = re.sub(r"[\\]*\*", r"*", row[1])
|
row[1] = re.sub(r"[\\]*\*", r"*", row[1])
|
||||||
row[0] = re.sub(r"(\*)([^\*\\n]*)(\*)", r"<em>\2</em>", row[0])
|
row[0] = re.sub(r"(\*)([^\*\n]*)(\*)", r"<em>\2</em>", row[0])
|
||||||
row[1] = re.sub(r"(\*)([^\*\\n]*)(\*)", r"<em>\2</em>", row[1])
|
row[1] = re.sub(r"(\*)([^\*\n]*)(\*)", 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…
Add table
Add a link
Reference in a new issue