@@ -0,0 +1,1088 @@
+from django import template%0Afrom django.utils.encoding import force_unicode%0Afrom django.utils.safestring import mark_safe%0Aimport markdown as markitdown%0A%0Aregister = template.Library()%0A%0A%0A@register.filter(is_safe=True)%0Adef markdown(value, args=''):%0A    %22%22%22%0A    Runs Markdown over a given value, optionally using various%0A    extensions python-markdown supports.%0A%0A    Syntax::%0A%0A        %7B%7B value%7Cmarkdown:%22extension1_name,extension2_name...%22 %7D%7D%0A%0A    To enable safe mode, which strips raw HTML and only returns HTML%0A    generated by actual Markdown syntax, pass %22safe%22 as the first%0A    extension in the list.%0A%0A    If the version of Markdown in use does not support extensions,%0A    they will be silently ignored.%0A    %22%22%22%0A    extensions = %5Be for e in args.split(',') if e%5D%0A    if len(extensions) %3E 0 and extensions%5B0%5D == %22safe%22:%0A        extensions = extensions%5B1:%5D%0A        safe_mode = True%0A    else:%0A        safe_mode = False%0A%0A    return mark_safe(markitdown.markdown(%0A        force_unicode(value),%0A        extensions,%0A        safe_mode=safe_mode,%0A        enable_attributes=(not safe_mode)%0A    ))%0A

Add markwhat/markdown templatetag