Help us shape the future of Go! Take the 2026 Go Developer Survey

linktransformer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FileNotFoundErr = LookupError(errors.New("file not found"))
	IDNotFoundErr   = LookupError(errors.New("file exists, but does not have such id"))
)

Functions

func GetAnchorDir

func GetAnchorDir(anchorDir string, files []string) (_ string, err error)

GetAnchorDir returns validated anchor dir against files provided.

func NewLocalizer

func NewLocalizer(logger log.Logger, address *regexp.Regexp, anchorDir string) mdformatter.LinkTransformer

NewLocalizer returns mdformatter.LinkTransformer that transforms links that matches address via given regexp to local markdown file path (if exists).

func NewValidator

func NewValidator(logger log.Logger, except *regexp.Regexp, anchorDir string) mdformatter.LinkTransformer

NewValidator returns mdformatter.LinkTransformer that crawls all links.

Types

type LookupError

type LookupError error

Jump to

Keyboard shortcuts

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