markdown

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FontmatterDelimeterYAML rune = '-'
	FrontmaterDelimeterTOML rune = '+'
	FrontmaterDelimeterCue  rune = ':'
)

Variables

View Source
var KindActionButton = ast.NewNodeKind("ActionButton")

Functions

func CopyWithRelativePathPrefix added in v0.0.5

func CopyWithRelativePathPrefix(
	w io.Writer,
	source []byte,
	relativePathPrefix string,
) (err error)

func GetFirstHeadingText added in v0.1.8

func GetFirstHeadingText(source []byte) (result string)

func New

func New() goldmark.Markdown

func NewPlaintextRenderer added in v0.0.5

func NewPlaintextRenderer() renderer.Renderer

NewPlaintextRenderer creates and returns a new PlaintextRenderer instance.

func ParseFrontmatter added in v0.0.5

func ParseFrontmatter(source []byte, delimeter rune) (frontmatter map[string]any, err error)

func SplitFrontmatterFromContent added in v0.0.5

func SplitFrontmatterFromContent(source []byte) (frontmatter, content []byte, delimeter rune, err error)

func SplitOnLastHorizontalRule added in v0.0.5

func SplitOnLastHorizontalRule(data []byte) (most, tail []byte, ok bool)

Types

type ActionButtonInjector added in v0.2.0

type ActionButtonInjector struct{}

func (*ActionButtonInjector) Transform added in v0.2.0

func (g *ActionButtonInjector) Transform(node *ast.Document, reader text.Reader, pc parser.Context)

type ActionButtonNode added in v0.2.0

type ActionButtonNode struct {
	ast.Link
}

func (*ActionButtonNode) Dump added in v0.2.0

func (n *ActionButtonNode) Dump(source []byte, level int)

func (*ActionButtonNode) Kind added in v0.2.0

func (n *ActionButtonNode) Kind() ast.NodeKind
type Link struct {
	Name        string
	Destination string
}
func CollectLinks(source []byte) (result []Link)

Jump to

Keyboard shortcuts

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