~kota/goldmark-wiki

Goldmark extension for wiki link syntax.
fix readme example imports
lower required go version
add sourcehut build.yml

clone

read-only
https://git.sr.ht/~kota/goldmark-wiki
read/write
git@git.sr.ht:~kota/goldmark-wiki

You can also use your local clone with git send-email.

#goldmark-wiki godocs.io builds.sr.ht status

Adds wiki style link support to goldmark. Includes a parsers and HTML renderer. I use this extension's parser in my gemtext renderer library.

A wiki style link uses the form [[click here]] where "click here" will be both the link's destination and label. A pipe character | can provide a seperate destination and label: [[destination page|click here]]

import (
    "bytes"

    wiki "git.sr.ht/~kota/goldmark-wiki"
    "github.com/yuin/goldmark"
)

md := goldmark.New(
  goldmark.WithExtensions(wiki.Wiki),
)
var buf bytes.Buffer
if err := md.Convert(source, &buf); err != nil {
    panic(err)
}