yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

Q: How can I get the text values of a node? #295

Closed droslean closed 2 years ago

droslean commented 2 years ago

In https://pkg.go.dev/github.com/yuin/goldmark@v1.4.11/ast#Node

type Node interface {
...
// Text returns text values of this node.
Text(source []byte) []byte
...

However, it is unclear what the source bytes are.