summaryrefslogtreecommitdiff
path: root/app/utils
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2015-12-03 16:24:36 -0500
committerluxagraf <sng@luxagraf.net>2015-12-03 16:24:36 -0500
commite4a7f290d373427c36d7925e7381aadf16524936 (patch)
treef38fe76393ddac2d77f653a109ac360fa2fb75d1 /app/utils
parent657d719bfdc33c8b01a430ea3f58a4907c558f9d (diff)
switched over to using a single markdown processor from utils everywhere
except notes because I'm urlizing notes and I don't want to do that anywhere else.
Diffstat (limited to 'app/utils')
-rw-r--r--app/utils/widgets.py13
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.