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

Unexported inlining of exported fields #407

Closed akfaew closed 1 year ago

akfaew commented 1 year ago

May I direct your attention here:

https://github.com/yuin/goldmark/blob/master/ast/inline.go#L375

Because we have an unexported inlining of exported fields, code like:

fmt.Printf("`-> %v\n", string(node.Destination))

Works fine. However, the documentation for ast.Link looks like this:

$ go doc ast.Link
package ast // import "github.com/yuin/goldmark/ast"

type Link struct {
        // Has unexported fields.
}
    A Link struct represents a link of the Markdown text.

func NewLink() *Link
func (n *Link) Dump(source []byte, level int)
func (n *Link) Inline()
func (n *Link) Kind() NodeKind

Thus creating some confusion.

Would it be possible to make the inlining exported?