diff --git a/html_generator.py b/html_generator.py index 35fcac1..9b0ed3b 100644 --- a/html_generator.py +++ b/html_generator.py @@ -233,7 +233,8 @@ def generate_chat_html(history, name1, name2, character): img = f'' 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[1] = re.sub(r"[\\]*\*", r"*", row[1]) row[0] = re.sub(r"(\*)([^\*\n]*)(\*)", r"\2", row[0])