diff --git a/events/templatetags/events_extras.py b/events/templatetags/events_extras.py index 969723c..abfae11 100644 --- a/events/templatetags/events_extras.py +++ b/events/templatetags/events_extras.py @@ -1,4 +1,3 @@ -from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from markdown import markdown @@ -7,5 +6,5 @@ from events import register @register.filter(name='markdown_to_html', needs_autoescape=False) def markdown_to_html(value): - result = markdown(value) + result = markdown(value, extensions=['codehilite']) return mark_safe(result) diff --git a/requirements.txt b/requirements.txt index 5c8998a..b2455cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ idna==2.10 kombu==4.6.11 markdown==3.2.2 mysqlclient==2.0.1 +Pygments>=2.3.1 python-crontab==2.5.1 python-dateutil==2.8.1 pytz==2020.1 diff --git a/templates/base.html b/templates/base.html index 86a3c95..798cd50 100644 --- a/templates/base.html +++ b/templates/base.html @@ -6,6 +6,7 @@ {% block title %}{% endblock %} – KeRS + {% block styles %}{% endblock %}