diff options
Diffstat (limited to 'app/utils/widgets.py')
-rw-r--r-- | app/utils/widgets.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/utils/widgets.py b/app/utils/widgets.py index 05443bb..90a0505 100644 --- a/app/utils/widgets.py +++ b/app/utils/widgets.py @@ -6,16 +6,23 @@ from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.conf import settings import markdown -from mdx_attr_list.mdx_attr_list import AttrListExtension -def markdown_processor(txt): + +def markdown_to_html(txt): md = markdown.Markdown( - extensions=[AttrListExtension(),'footnotes',], + extensions=[ + 'markdown.extensions.fenced_code', + 'markdown.extensions.codehilite(css_class=highlight,linenums=False)', + 'markdown.extensions.attr_list', + 'footnotes', + 'extra' + ], output_format='html5', safe_mode=False ) return md.convert(txt) + class TagListFilter(admin.SimpleListFilter): # Human-readable title which will be displayed in the # right admin sidebar just above the filter options. |