From d6c68c2ec2276ffd0c6699462a11079345f26f5c Mon Sep 17 00:00:00 2001 From: Bastien Schils Date: Tue, 6 Jun 2023 00:13:06 +0200 Subject: [PATCH] Enable fenced_code extenstion for markdown messages --- simplematrixbotlib/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simplematrixbotlib/api.py b/simplematrixbotlib/api.py index 1d87b3d..bcb2689 100644 --- a/simplematrixbotlib/api.py +++ b/simplematrixbotlib/api.py @@ -263,7 +263,9 @@ async def send_markdown_message(self, room_id, message, msgtype='m.text'): "org.matrix.custom.html", "formatted_body": markdown.markdown(message, - extensions=['nl2br']) + extensions=[ + 'nl2br', + 'fenced_code']) }) async def send_image_message(self, room_id, image_filepath):