1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix #8097: Re-fix markdown table rendering

This commit is contained in:
kkthxbye-code
2021-12-20 23:31:24 +01:00
parent 4a3bc8d365
commit 3a54ecb522
9 changed files with 25 additions and 8 deletions

View File

@@ -59,6 +59,10 @@ def render_markdown(value):
# Render Markdown
html = markdown(value, extensions=['fenced_code', 'tables', StrikethroughExtension()])
# If the string is not empty wrap it in rendered-markdown to style tables
if html:
html = f'<div class="rendered-markdown">{html}</div>'
return mark_safe(html)