Skip to content

Commit

Permalink
Remove markdown support from faults (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
berk76 authored Oct 25, 2024
1 parent a7f3742 commit bacbce9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
django==5.1.2
markdown==3.7
django-tinymce==4.1.0
openpyxl==3.1.5
psycopg==3.2.3
2 changes: 1 addition & 1 deletion svjis/articles/templates/fault.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1 class="page-title" {% if obj.closed %}style="text-decoration: line-through;
</tr>
<tr>
<th class="list" scope="row">{% trans 'Description' %}</th>
<td class="list">{{ obj.description | markdown | highlight:search | safe }}</td>
<td class="list">{{ obj.description | replace_url_to_link | linebreaks | highlight:search | safe }}</td>
</tr>
</table>

Expand Down
8 changes: 0 additions & 8 deletions svjis/articles/templatetags/article_filters.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import gettext as gt
from django.template.defaultfilters import stringfilter
from django.conf import settings
import markdown as md
import re
from re import IGNORECASE, compile

register = template.Library()


@register.filter()
@stringfilter
def markdown(value):
return md.markdown(value, extensions=['markdown.extensions.fenced_code'])


@register.filter()
def highlight(text, search):
if search == '':
Expand Down

0 comments on commit bacbce9

Please sign in to comment.