goldmark-hashtag is an extension for the goldmark library to handle
#example
hashtags providing a Hashtag AST type.
This markdown:
# Hello goldmark-hashtag
#example
With the default configuration, becomes this HTML:
<h1>Hello goldmark-hashtag</h1>
<p><a href="/tags/example">#example</a></p>
go get github.com/13rac1/goldmark-hashtag
markdown := goldmark.New(
goldmark.WithExtensions(
hashtag.Extension,
),
)
var buf bytes.Buffer
if err := markdown.Convert([]byte(source), &buf); err != nil {
panic(err)
}
fmt.Print(buf)
}
MIT
Brad Erickson