Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WikiLinkAttributeFilter = html.GlobalAttributeFilter
WikiLinkAttributeFilter defines attribute names which WikiLink elements can have.
View Source
var WikiLinker = &wikiLinker{}
WikiLinker is an extension that allow you to parse text that seems like a URL.
Functions ¶
func NewWikiLinker ¶
func NewWikiLinker(opts ...WikiLinkerOption) goldmark.Extender
func NewWikiLinkerHTMLRenderer ¶
func NewWikiLinkerHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewWikiLinkerHTMLRenderer returns a new WikiLinkerHTMLRenderer.
func NewWikiLinkerParser ¶
func NewWikiLinkerParser(opts ...WikiLinkerOption) parser.InlineParser
Types ¶
type WikiLinkResolver ¶
WikiLinkResolver resolves link destinations. If actual == nil parsing is skipped. CSS classes returned here are applied to the resulting <a>.
type WikiLinkerConfig ¶
type WikiLinkerConfig struct { WikiLinkRegexp *regexp.Regexp WikiLinkResolver }
type WikiLinkerOption ¶
type WikiLinkerOption interface { parser.Option SetWikiLinkerOption(*WikiLinkerConfig) }
func WithCustomResolver ¶
func WithCustomResolver(value WikiLinkResolver) WikiLinkerOption
WithCustomResolver is a functional option to define how WikiLinks are resolved.
func WithUnderscoreResolver ¶
func WithUnderscoreResolver() WikiLinkerOption
WithUnderscoreResolver replaces all whitespace in WikiLinks with underscores. Contiguous spaces are merged into a single underscore.
e.g.: `[[ Disambiguation (Disambiguation) ]]` becomes `Disambiguation_(Disambiguation)`
Click to show internal directories.
Click to hide internal directories.