From 80082639b536d2ffa72619b0f0d2c85e1c262c08 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 26 Dec 2021 14:30:12 +0200 Subject: [PATCH] Ignore color tags when parsing HTML --- mautrix_telegram/formatter/from_matrix/parser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mautrix_telegram/formatter/from_matrix/parser.py b/mautrix_telegram/formatter/from_matrix/parser.py index f8120a62..a689206c 100644 --- a/mautrix_telegram/formatter/from_matrix/parser.py +++ b/mautrix_telegram/formatter/from_matrix/parser.py @@ -91,3 +91,9 @@ class MatrixParser(BaseMatrixParser[TelegramMessage]): children = msg.trim().split("\n") children = [child.prepend("> ") for child in children] return TelegramMessage.join(children, "\n") + + async def color_to_fstring(self, msg: TelegramMessage, color: str) -> TelegramMessage: + return msg + + async def spoiler_to_fstring(self, msg: TelegramMessage, spoiler: str) -> TelegramMessage: + return msg