options

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Overview

Package options provides a configuration data structure to pass when invoking the Mycomarkup parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterwikiError

type InterwikiError int
const (
	Ok InterwikiError = iota
	UnknownPrefix
	NotSetUp
)

func (InterwikiError) Error

func (i InterwikiError) Error() string

type Options

type Options struct {
	// Canonical hypha name that is being parsed now.
	HyphaName string

	// Canonical URL (including the protocol) of your website. Used for OpenGraph. Example: https://mycorrhiza.wiki.
	WebSiteURL string

	TransclusionSupported bool
	RedLinksSupported     bool
	InterwikiSupported    bool

	HyphaExists           func(string) bool
	IterateHyphaNamesWith func(func(string))
	HyphaHTMLData         func(string) (rawText, binaryHtml string, err error)

	LocalTargetCanonicalName         func(string) string
	LocalLinkHref                    func(string) string
	LocalImgSrc                      func(string) string
	LinkHrefFormatForInterwikiPrefix func(string) (string, InterwikiError)
	ImgSrcFormatForInterwikiPrefix   func(string) (string, InterwikiError)
}

Options is what you pass when invoking the parser.

func (Options) FillTheRest

func (opts Options) FillTheRest() Options

Jump to

Keyboard shortcuts

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