Prevent the history from being altered by the html script
This commit is contained in:
parent
78d5a999e6
commit
8f3deec759
1 changed files with 2 additions and 1 deletions
|
@ -233,7 +233,8 @@ def generate_chat_html(history, name1, name2, character):
|
||||||
img = f'<img src="file/{i}">'
|
img = f'<img src="file/{i}">'
|
||||||
break
|
break
|
||||||
|
|
||||||
for i,row in enumerate(history[::-1]):
|
for i,_row in enumerate(history[::-1]):
|
||||||
|
row = _row.copy()
|
||||||
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])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue