几个 golang markdown 库
喜欢下面几个,都是纯 go 实现的 markdown 库
- https://github.com/yuin/goldmark 补扩展方便
- https://gitlab.com/golang-commonmark/markdown
- https://github.com/shurcooL/github_flavored_markdown
- https://github.com/knieriem/markdown - 这个最快,但插件少,支持早期的John Gruber's markdown ,可解析有限
cpu: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
BenchmarkGoldMark-8 445 2261484 ns/op 2756439 B/op 14766 allocs/op
BenchmarkGolangCommonMark-8 768 1465808 ns/op 2870731 B/op 20386 allocs/op
BenchmarkGFM-8 392 3163787 ns/op 9069009 B/op 52261 allocs/op
BenchmarkKnMarkdown-8 38713 30640 ns/op 136025 B/op 404 allocs/op
gfm
func (e *gfm) Extend(m goldmark.Markdown) {
Linkify.Extend(m)
Table.Extend(m)
Strikethrough.Extend(m)
TaskList.Extend(m)
}
0
See Also
Nearby
- 上一篇 › NameSilo 开始支持绑定支付宝自动续费
- 下一篇 › 在线看高分辨率的火星地图,没去过的可以看看