Apply nl2br and urlize to Markdown for better usability
This commit is contained in:
parent
66de568c69
commit
8fad94cd80
@ -8,3 +8,4 @@ google-api-python-client==1.7.7
|
||||
django-ratelimit==2.0.0
|
||||
boto3==1.9.86
|
||||
premailer==3.2.0
|
||||
markdown-urlize==0.2.0
|
||||
|
@ -42,6 +42,6 @@ def environment(**options):
|
||||
'MEDIA_URL': settings.MEDIA_URL,
|
||||
})
|
||||
env.filters.update({
|
||||
'markdown': lambda x: Markup(markdown.markdown(x))
|
||||
'markdown': lambda x: Markup(markdown.markdown(x, extensions=['nl2br', 'mdx_urlize']))
|
||||
})
|
||||
return env
|
||||
|
Loading…
Reference in New Issue
Block a user