ego008 avatar

几个 golang markdown 库

🕐 by ego008

喜欢下面几个,都是纯 go 实现的 markdown 库

plaintext: markdown benchmark
1
2
3
4
5
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

Go: goldmark gfm Extend
1
2
3
4
5
6
func (e *gfm) Extend(m goldmark.Markdown) {
	Linkify.Extend(m)
	Table.Extend(m)
	Strikethrough.Extend(m)
	TaskList.Extend(m)
}

💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.16.3 Processed in 0ms