details

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindDetailsBlock = gast.NewNodeKind("DetailsBlock")

KindDetailsBlock is the NodeKind for DetailsBlock.

Functions

func NewParser

func NewParser() parser.BlockParser

NewParser returns a new details block parser.

func NewRenderer

func NewRenderer() renderer.NodeRenderer

NewRenderer returns a new details renderer.

Types

type DetailsBlock

type DetailsBlock struct {
	gast.BaseBlock
	Summary string // The summary/title text
	Open    bool   // Whether the details are open by default
}

DetailsBlock is an AST node representing a collapsible details block.

func (*DetailsBlock) Dump

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

Dump implements ast.Node.Dump.

func (*DetailsBlock) Kind

func (n *DetailsBlock) Kind() gast.NodeKind

Kind implements ast.Node.Kind.

type Extension

type Extension struct{}

Extension is a goldmark extension that adds details/collapsible block support.

func (*Extension) Extend

func (e *Extension) Extend(m goldmark.Markdown)

Extend implements goldmark.Extender.

Jump to

Keyboard shortcuts

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