wikilink

package module
v0.0.0-...-5513b41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 10 Imported by: 0

README

goldmark-wikilink is an goldmark extension that parses and renders [[Wiki Links]].

Installation

go get github.com/oliger/goldmark-wikilink

Usage

See wikilink_test.go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WikiLink = newWithDefaultOptions()

WikiLink is a goldmark extension configured with default options.

Functions

func New

func New(opts ...Option) goldmark.Extender

New returns a goldmark extension that can be configured with options.

Types

type Option

type Option func(*wikiLinkExtension)

Option is used to configure the extension.

func WithAliasDelimiter

func WithAliasDelimiter(aliasDelimiter byte) Option

WithAliasDelimiter sets alias delimiter.

func WithRenderFunc

func WithRenderFunc(renderFunc RenderFunc) Option

WithRenderFunc sets the function used to render wikilinks.

func WithResolveDestinationFunc

func WithResolveDestinationFunc(resolveDestinationFunc ResolveDestinationFunc) Option

WithResolveDestinationFunc sets the function used to resolve destination.

type RenderFunc

type RenderFunc func(wl *ast.WikiLink) string

RenderFunc renders a wiki link.

type ResolveDestinationFunc

type ResolveDestinationFunc func(rawDest []byte) (string, bool)

ResolveDestinationFunc maps a raw destination to a file path and determines if the file exists.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL