callout

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package callout is a placeholder for Obsite Markdown callouts.

Index

Constants

This section is empty.

Variables

View Source
var Extension = &extender{}

Extension wires the local callout parser, AST rewrite, and renderer. Evaluated VojtaStruhar/goldmark-obsidian-callout on 2026-04-05: upstream README still lists default callout titles as unsupported, and its tests render untitled callouts with an empty <summary>. Step 8 needs a stable, visible .callout-title fallback and keeps non-folded callouts as <div>, so this package retains a local AST transformer instead of adding that dependency.

View Source
var KindCallout = gast.NewNodeKind("Callout")

Functions

func New

func New() goldmark.Extender

func NewASTTransformer

func NewASTTransformer() parser.ASTTransformer

func NewHTMLRenderer

func NewHTMLRenderer() renderer.NodeRenderer

func NewParagraphTransformer

func NewParagraphTransformer() parser.ParagraphTransformer

Types

type Callout

type Callout struct {
	gast.BaseBlock
	CalloutType string
	Title       string
	Fold        FoldMode
}

func NewCallout

func NewCallout(calloutType, title string, fold FoldMode) *Callout

func (*Callout) Dump

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

func (*Callout) Kind

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

type FoldMode

type FoldMode uint8
const (
	FoldNone FoldMode = iota
	FoldOpen
	FoldClosed
)

type HTMLRenderer

type HTMLRenderer struct{}

func (*HTMLRenderer) RegisterFuncs

func (r *HTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)

Jump to

Keyboard shortcuts

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