quartz/pkg/mod/github.com/abhinav/goldmark-wikilink@v0.3.0/README.md
Adam Gospodarczyk da2d93f602 Brain
2022-04-26 16:25:19 +02:00

1.2 KiB

Go Reference Go codecov

goldmark-wikilink is an extension for the goldmark Markdown parser that supports parsing [[...]]-style wiki links.

Usage

To use goldmark-wikilink, import the wikilink package.

import wikilink "github.com/abhinav/goldmark-wikilink"

Then include the wiklink.Extender in the list of extensions you build your goldmark.Markdown with.

goldmark.New(
  &wiklink.Extender{}
  // ...
)

goldmark-wikilink provides control over destinations of wikilinks with the Resolver type. Specify a custom Resolver to the Extender when installing it.

goldmark.New(
  &wiklink.Extender{
    Resolver: myresolver,
  }
  // ...
)