Skip to content

Commit 6ac363e

Browse files
committed
Remove remaining use of markdown2. Enable markdown extras when rendering agendas. Fixes ietf-tools#3316. Commit ready for merge.
- Legacy-Id: 19358
1 parent d784140 commit 6ac363e

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

ietf/meeting/tests_views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,10 @@ def do_test_materials(self, meeting, session):
546546
filename = cont_disp_settings.get('filename', '').strip('"')
547547
if filename.endswith('.md'):
548548
for accept, cont_type, content in [
549-
('text/html,text/plain,text/markdown', 'text/html', '<li><p>More work items underway</p></li>'),
549+
('text/html,text/plain,text/markdown', 'text/html', '<li>\n<p>More work items underway</p>\n</li>'),
550550
('text/markdown,text/html,text/plain', 'text/markdown', '1. More work items underway'),
551551
('text/plain,text/markdown, text/html', 'text/plain', '1. More work items underway'),
552-
('text/html', 'text/html', '<li><p>More work items underway</p></li>'),
552+
('text/html', 'text/html', '<li>\n<p>More work items underway</p>\n</li>'),
553553
('text/markdown', 'text/markdown', '1. More work items underway'),
554554
('text/plain', 'text/plain', '1. More work items underway'),
555555
]:

ietf/meeting/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import re
1515
import tarfile
1616
import tempfile
17-
import markdown2
17+
import markdown
1818

1919
from calendar import timegm
2020
from collections import OrderedDict, Counter, deque, defaultdict
@@ -261,7 +261,7 @@ def materials_document(request, document, num=None, ext=None):
261261
content_type = content_type.replace('plain', 'markdown', 1)
262262
break;
263263
elif atype[0] == 'text/html':
264-
bytes = "<html>\n<head></head>\n<body>\n%s\n</body>\n</html>\n" % markdown2.markdown(bytes)
264+
bytes = "<html>\n<head></head>\n<body>\n%s\n</body>\n</html>\n" % markdown.markdown(bytes.decode(),extensions=['extra'])
265265
content_type = content_type.replace('plain', 'html', 1)
266266
break;
267267
elif atype[0] == 'text/plain':

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jwcrypto>=0.4.0 # for signed notifications
3939
logging_tree>=1.8.1
4040
lxml>=3.4.0,<5
4141
markdown>=3.3.4
42-
markdown2>=2.3.8
4342
mock>=2.0.0
4443
mypy>=0.782,<0.790 # Version requirements determined by django-stubs.
4544
mysqlclient>=1.3.13,!=2.0.2

0 commit comments

Comments
 (0)