markdown

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLinkModifierRenderer

func NewLinkModifierRenderer(opts ...renderer.Option) renderer.Renderer

NewLinkModifierRenderer returns a new linkModifierRenderer with given renderer options.

func Parse

func Parse(source []byte) (ast.Node, error)

Parse markdown content and returns AST node or error

func WithLinkResolver

func WithLinkResolver(linkResolver ResolveLink) renderer.Option

WithLinkResolver is a functional option that allow you to set the ResolveLink to the renderer.

Types

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer holds document source, buffer writer, info for indents and some nodes for rendering a markdown

type ResolveLink func(dest string, isEmbeddable bool) (string, error)

ResolveLink type defines function for modifying link destination dest - original destination isEmbeddable - if true, raw destination required

Jump to

Keyboard shortcuts

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