Skip to content

Commit

Permalink
Properly style Markdown table; closes #1136
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene committed Oct 23, 2019
1 parent 1a9fa2d commit 019812f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions judge/jinja2/markdown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def autolink(self, link, is_email=False):
link = 'mailto:%s' % link
return '<a href="%s"%s>%s</a>' % (link, self._link_rel(link), text)

def table(self, header, body):
return (
'<table class="table">\n<thead>%s</thead>\n'
'<tbody>\n%s</tbody>\n</table>\n'
) % (header, body)

def link(self, link, title, text):
link = mistune.escape_link(link)
if not title:
Expand Down

0 comments on commit 019812f

Please sign in to comment.