mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 12:12:53 -06:00
Upgrade Markdown to v3.5.1
This commit is contained in:
parent
115111df9e
commit
2b7cc1e6fa
@ -90,9 +90,8 @@ gunicorn
|
|||||||
Jinja2
|
Jinja2
|
||||||
|
|
||||||
# Simple markup language for rendering HTML
|
# Simple markup language for rendering HTML
|
||||||
# https://python-markdown.github.io/change_log/
|
# https://python-markdown.github.io/changelog/
|
||||||
# mkdocs currently requires Markdown v3.3
|
Markdown
|
||||||
Markdown<3.4
|
|
||||||
|
|
||||||
# File inclusion plugin for Python-Markdown
|
# File inclusion plugin for Python-Markdown
|
||||||
# https://github.com/cmacmackin/markdown-include
|
# https://github.com/cmacmackin/markdown-include
|
||||||
|
@ -8,6 +8,7 @@ from django.contrib.contenttypes.models import ContentType
|
|||||||
from django.utils.html import escape
|
from django.utils.html import escape
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from markdown import markdown
|
from markdown import markdown
|
||||||
|
from markdown.extensions.tables import TableExtension
|
||||||
|
|
||||||
from netbox.config import get_config
|
from netbox.config import get_config
|
||||||
from utilities.markdown import StrikethroughExtension
|
from utilities.markdown import StrikethroughExtension
|
||||||
@ -163,7 +164,12 @@ def render_markdown(value):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
# Render Markdown
|
# Render Markdown
|
||||||
html = markdown(value, extensions=['def_list', 'fenced_code', 'tables', StrikethroughExtension()])
|
html = markdown(value, extensions=[
|
||||||
|
'def_list',
|
||||||
|
'fenced_code',
|
||||||
|
StrikethroughExtension(),
|
||||||
|
TableExtension(use_align_attribute=True),
|
||||||
|
])
|
||||||
|
|
||||||
# If the string is not empty wrap it in rendered-markdown to style tables
|
# If the string is not empty wrap it in rendered-markdown to style tables
|
||||||
if html:
|
if html:
|
||||||
|
@ -20,7 +20,7 @@ feedparser==6.0.10
|
|||||||
graphene-django==3.0.0
|
graphene-django==3.0.0
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
Markdown==3.3.7
|
Markdown==3.5.1
|
||||||
mkdocs-material==9.4.14
|
mkdocs-material==9.4.14
|
||||||
mkdocstrings[python-legacy]==0.24.0
|
mkdocstrings[python-legacy]==0.24.0
|
||||||
netaddr==0.9.0
|
netaddr==0.9.0
|
||||||
|
Loading…
Reference in New Issue
Block a user