扫码关注官方订阅号
我用的Django1.8, 插件时Markdown,但是不能渲染表格,有什么好的解决办法吗?
默认不支持, 需要配置 扩展项
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
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
默认不支持, 需要配置 扩展项