请问Python Markdown和Markdown2高手们更推荐哪个,markdownmarkdown2,MarkdownPyth
请问Python Markdown和Markdown2高手们更推荐哪个,markdownmarkdown2,MarkdownPyth
Markdown
Python implementation of Markdown.
This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though there are a few known issues. See Features for information on what exactly is supported and what is not. Additional features are supported by the Available Extensions.
Markdown2
A fast and complete Python implementation of Markdown
markdown2: A fast and complete Python implementation of Markdown.
Markdown is a text-to-HTML filter; it translates an easy-to-read / easy-to-write structured text format into HTML. Markdown's text format is most similar to that of plain text email, and supports features such as headers, emphasis, code blocks, blockquotes, and links.
有对比么?大神们推荐使用哪个呢?
据说是Markdown2更快一些
另外说一个区别:
Python-Markdown的结构上比Markdown2好得多,扩展性也好,可以自定义extension。
Markdown2 更快一點?簡直是一個笑話。你稍微做一下 benchmark 就不會這樣說了。
這裏是我在我的機器上跑的幾次數據:
Markdown: 47.7091sMarkdown2: 80.5163sMarkdown: 47.9369sMarkdown2: 79.5075sMarkdown: 46.4342sMarkdown2: 78.2267s
它們並沒有本質上的區別,除了 markdown2 自我吹噓了一把,騙了不少人。
我不知道提問者是在尋找一個 markdown 解析器,還是想要單純地做一個對比。如果是單純地做一個對比的話,答案就是 Markdown 更快一點,Markdown2 是單文件。
但是如果提問者是想找一個更好的 markdown 解析器的話,那選擇還有很多。
具體的對比可參考這篇文章 Markdown Parsers in Python。
另外完整的 Benchmark 數據請查看: https://github.com/lepture/mistune/issues/1
官方文档说是Markdown2比Markdown 更加迅速和完整。用那个的话,你可以自己选择,哪个舒服用哪个。就我个人来说,推荐Markdown2,就因为一个字:快
推荐misaka
python-markdown在解析代码块时有Bug
编橙之家文章,
相关内容
- python2.7.3 uwsgi安装出错,python2.7.3uwsgi,系统信息:Linux v
- 求问Python归并排序求逆序数方法,python逆序,class nx:
- python django在nginx里模板输出html标签出错,djangonginx,就是
- Python与php在数据处理方面差异有哪些?,python数据处理
- Django项目删除最正确方法是什么,django项目方法,版本信
- 谁能讲解关于Python yield用途和作用,pythonyield,搜索了下
- Python xlwings插件报错跪求大神帮助,pythonxlwings,就这样了
- python什么方法能把../这样的网址转换成真实地址呢?,
- https类型网页python scrapy能爬取吗,pythonscrapy,想获得ht
- Python2.7安装MySQLdb报failed with exit status错误,python2.7mys
评论关闭