Skip to content

Commit

Permalink
[Django Upgrade] Upgrade markdown and mdx_del_ins (#9984)
Browse files Browse the repository at this point in the history
Co-authored-by: John Tordoff <>
  • Loading branch information
Johnetordoff authored and cslzchen committed Oct 20, 2022
1 parent b050caa commit 7a67198
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
12 changes: 4 additions & 8 deletions addons/wiki/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,12 @@ def build_html_output(content, node):
content,
extensions=[
wikilinks.WikiLinkExtension(
configs=[
('base_url', ''),
('end_url', ''),
('build_url', functools.partial(build_wiki_url, node))
]
base_url='',
end_url='',
build_url=functools.partial(build_wiki_url, node)
),
fenced_code.FencedCodeExtension(),
codehilite.CodeHiliteExtension(
[('css_class', 'highlight')]
)
codehilite.CodeHiliteExtension(css_class='highlight')
]
)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Werkzeug==1.0.0
Flask==1.0
gevent==1.2.2
Mako==1.0.7
Markdown==2.6.9
Markdown==3.3.7
WTForms==1.0.4
# Fork of celery 4.1.1 with https://github.com/celery/celery/pull/4278 backported,
# which fixes a bug that was causing stuck registrations
Expand Down Expand Up @@ -40,7 +40,7 @@ pymongo==3.7.1
PyYAML==6.0
tqdm==4.28.1
# Python markdown extensions for comment emails
git+https://github.com/CenterForOpenScience/mdx_del_ins.git
git+https://github.com/Johnetordoff/mdx_del_ins.git@django-3

certifi==2020.12.5
sendgrid==1.5.13
Expand Down
2 changes: 1 addition & 1 deletion website/project/views/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def update_comment_node(root_target_id, source_node, destination_node):


def render_email_markdown(content):
return markdown.markdown(content, ['del_ins', 'markdown.extensions.tables', 'markdown.extensions.fenced_code'])
return markdown.markdown(content, extensions=['mdx_del_ins', 'markdown.extensions.tables', 'markdown.extensions.fenced_code'])


@comment_added.connect
Expand Down

0 comments on commit 7a67198

Please sign in to comment.