goldmark-wikilink is an extension for the goldmark library that extends
Markdown to support [[title]]
Wikilink style links with a new AST
type and HTML Renderer.
This markdown:
# Hello goldmark-wikilink
[[Example Link]]
Becomes this HTML, with the default Normalizer:
<h1>Hello goldmark-wikilink</h1>
<p><a href="Example%20Link.html">Example Link</a></p>
go get github.com/13rac1/goldmark-wikilink
markdown := goldmark.New(
goldmark.WithExtensions(
wikilink.Extension,
),
)
var buf bytes.Buffer
if err := markdown.Convert([]byte(source), &buf); err != nil {
panic(err)
}
fmt.Print(buf)
}
- Support Piped Links in the form
[target|displayed text]
. - Support Section linking in the forms:
- External link:
[[Page name#Section name|displayed text]]
- Internal link:
[[#Section name|displayed text]]
- External link:
MIT
Brad Erickson & Kevin Dangoor
Fork of dangoor/goldmark-wikilinks. Adds a Wikilink AST type to ease extending and removes the WikilinkTracker which can implemented in a separate AST walker.