Rumah > Soal Jawab > teks badan
我用的Django1.8, 插件时Markdown,但是不能渲染表格,有什么好的解决办法吗?
ringa_lee2017-04-17 17:26:21
默认不支持, 需要配置 扩展项
def md(str_md=''):
'''
Renders the specified markdown content and embedded styles.
'''
str_html = ''
str_html = markdown(str_md, extensions=[
# 'urlize',
'fenced_code',
'codehilite(css_class=highlight)',
'toc',
'tables',
'sane_lists',
])
return str_htmldef gfm(str_md=''):
'''
Renders the specified markdown content and embedded styles.
'''
str_html = ''
str_html = markdown(str_md, extensions=[
# 'urlize',
'fenced_code',
'codehilite(css_class=highlight)',
'toc',
'tables',
'sane_lists',
])
return str_html