a Django-based indieweb.org site https://00dani.me/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
lemoncurry/lemoncurry/jinja2/markdown.py

16 lines
281 B

from jinja2 import pass_eval_context
from markdown import Markdown
from .bleach import bleach
md = Markdown(extensions=(
'extra',
'sane_lists',
'smarty',
'toc',
))
@pass_eval_context
def markdown(ctx, source):
return bleach(ctx, md.reset().convert(source))