Fix mdx_urlize for emails

This commit is contained in:
Yingtong Li 2020-01-27 16:45:47 +11:00
parent e5803e1b41
commit eb411a78a2
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1,5 +1,5 @@
# Society Self-Service
# Copyright © 2018-2019 Yingtong Li (RunasSudo)
# Copyright © 2018-2020 Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -22,6 +22,8 @@ from django.conf import settings
from django.template import loader
from jinja2 import Markup
from selfserv.mdx_urlize import UrlizeExtension
import logging
import markdown
@ -36,7 +38,7 @@ class Emailer:
self.template = loader.get_template('ssmain/email/rendered.html')
def markdown(self, x):
return markdown.markdown(x, extensions=['mdx_urlize', 'fenced_code'])
return markdown.markdown(x, extensions=[UrlizeExtension(), 'fenced_code'])
def boto3_send(self, *args, **kwargs):
for i in range(0, 10):