Skip to content

Commit

Permalink
fix: tables in markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Mar 28, 2024
1 parent d719957 commit a2a5d3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions uniticket/uni_ticket/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,8 @@
PRECOMPILED_TICKET_EXPIRE_DAYS = getattr(
settings, 'PRECOMPILED_TICKET_EXPIRE_DAYS', 7)

MARKDOWN_EXTENSIONS = getattr(
settings, "MARKDOWN_EXTENSIONS",
["markdown.extensions.fenced_code",
"markdown.extensions.tables"]
)
2 changes: 1 addition & 1 deletion uniticket/uni_ticket/templatetags/uni_ticket_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def obj_get_attr(obj, attr, **kwargs):
@register.filter()
@stringfilter
def markdown(value):
return md.markdown(value, extensions=["markdown.extensions.fenced_code"])
return md.markdown(value, extensions=uni_ticket_settings.MARKDOWN_EXTENSIONS)


@register.simple_tag
Expand Down

0 comments on commit a2a5d3f

Please sign in to comment.