Skip to content

Commit 2b7cc1e

Browse files
committed
Upgrade Markdown to v3.5.1
1 parent 115111d commit 2b7cc1e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

base_requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ gunicorn
9090
Jinja2
9191

9292
# Simple markup language for rendering HTML
93-
# https://python-markdown.github.io/change_log/
94-
# mkdocs currently requires Markdown v3.3
95-
Markdown<3.4
93+
# https://python-markdown.github.io/changelog/
94+
Markdown
9695

9796
# File inclusion plugin for Python-Markdown
9897
# https://github.com/cmacmackin/markdown-include

netbox/utilities/templatetags/builtins/filters.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from django.utils.html import escape
99
from django.utils.safestring import mark_safe
1010
from markdown import markdown
11+
from markdown.extensions.tables import TableExtension
1112

1213
from netbox.config import get_config
1314
from utilities.markdown import StrikethroughExtension
@@ -163,7 +164,12 @@ def render_markdown(value):
163164
return ''
164165

165166
# Render Markdown
166-
html = markdown(value, extensions=['def_list', 'fenced_code', 'tables', StrikethroughExtension()])
167+
html = markdown(value, extensions=[
168+
'def_list',
169+
'fenced_code',
170+
StrikethroughExtension(),
171+
TableExtension(use_align_attribute=True),
172+
])
167173

168174
# If the string is not empty wrap it in rendered-markdown to style tables
169175
if html:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ feedparser==6.0.10
2020
graphene-django==3.0.0
2121
gunicorn==21.2.0
2222
Jinja2==3.1.2
23-
Markdown==3.3.7
23+
Markdown==3.5.1
2424
mkdocs-material==9.4.14
2525
mkdocstrings[python-legacy]==0.24.0
2626
netaddr==0.9.0

0 commit comments

Comments
 (0)