From 368d3fff3c49a479a008c13c59e2951e7ad64726 Mon Sep 17 00:00:00 2001 From: Antoni-Czaplicki <56671347+Antoni-Czaplicki@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:44:54 +0200 Subject: [PATCH] Add newline breaks to message content --- custom_components/vulcan/fetch_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/vulcan/fetch_data.py b/custom_components/vulcan/fetch_data.py index de7dda7..f38a58b 100644 --- a/custom_components/vulcan/fetch_data.py +++ b/custom_components/vulcan/fetch_data.py @@ -305,7 +305,7 @@ async def get_latest_message(client): latest_message["content"] = re.sub( re.compile("<.*?>|&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});"), "", - message.content, + message.content.replace("
", "\n").replace("

", "\n"), ) if message.sender is not None: latest_message["sender"] = message.sender.name