diff --git a/html_generator.py b/html_generator.py index 839aa762..ce2189e5 100644 --- a/html_generator.py +++ b/html_generator.py @@ -236,8 +236,8 @@ def generate_chat_html(history, name1, name2, character): for i,row in enumerate(history[::-1]): row[0] = re.sub(r"[\\]*\*", r"*", row[0]) row[1] = re.sub(r"[\\]*\*", r"*", row[1]) - row[0] = re.sub(r"(\*)([^\*]*)(\*)", r"\2", row[0]) - row[1] = re.sub(r"(\*)([^\*]*)(\*)", r"\2", row[1]) + row[0] = re.sub(r"(\*)([^\*\\n]*)(\*)", r"\2", row[0]) + row[1] = re.sub(r"(\*)([^\*\\n]*)(\*)", r"\2", row[1]) p = '\n'.join([f"
{x}
" for x in row[1].split('\n')]) output += f"""