From ce83079d59f941d9eb3e2afacf9f3b6e8dd8085c Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 20 Apr 2020 19:18:53 +0200 Subject: [PATCH] markdown: extra https://python-markdown.github.io/extensions/extra/ To get
 tags on fenced code
---
 matrix_webhook.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/matrix_webhook.py b/matrix_webhook.py
index 6f18f75..eb4e06c 100755
--- a/matrix_webhook.py
+++ b/matrix_webhook.py
@@ -13,9 +13,8 @@ import os
 from http import HTTPStatus
 from signal import SIGINT, SIGTERM
 
-from markdown import markdown
-
 from aiohttp import web
+from markdown import markdown
 from nio import AsyncClient
 
 SERVER_ADDRESS = ('', int(os.environ.get('PORT', 4785)))
@@ -45,7 +44,7 @@ async def handler(request):
                                        "msgtype": "m.text",
                                        "body": data['text'],
                                        "format": "org.matrix.custom.html",
-                                       "formatted_body": markdown(data['text']),
+                                       "formatted_body": markdown(data['text'], extensions=['extra']),
                                    })
 
     return web.Response(text='{"status": %i, "ret": "%s"}' % (status, ret),