pandoc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Unlicense Imports: 8 Imported by: 0

Documentation

Overview

Package pandoc provides types and functions for encoding pandoc flavoured markdown

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

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

func (*Content) BlockQuote

func (w *Content) BlockQuote(m Text)

func (*Content) DefinitionList

func (w *Content) DefinitionList(items [][2]Text)

func (*Content) EmptyPara

func (w *Content) EmptyPara()

func (*Content) EncodeBold

func (w *Content) EncodeBold(m Text) Text

func (*Content) EncodeItalic

func (w *Content) EncodeItalic(m Text) Text
func (w *Content) EncodeLink(text Text, url string) Text
func (w *Content) EncodeModelLink(text Text, m any) Text

func (*Content) EncodeModelLinkDedupe

func (w *Content) EncodeModelLinkDedupe(firstText Text, subsequentText Text, m any) Text

func (*Content) EncodeModelLinkNamed

func (w *Content) EncodeModelLinkNamed(m any, nc render.NameChooser, pov *model.POV) Text

func (*Content) EncodeText

func (p *Content) EncodeText(ss ...string) Text

func (*Content) EncodeWithCitations

func (w *Content) EncodeWithCitations(s Text, citations []*model.GeneralCitation) Text

func (*Content) FactList

func (w *Content) FactList([]render.FactEntry[Text])

func (*Content) Figure

func (w *Content) Figure(link string, alt string, caption Text, highlight *model.Region, downloadName string)

Requires implicit_figures extension

func (*Content) GroupedList added in v0.0.6

func (w *Content) GroupedList([]render.Grouping[Text])

func (*Content) Heading1

func (w *Content) Heading1(m Text, id string)

func (*Content) Heading2

func (w *Content) Heading2(m Text, id string)

func (*Content) Heading3

func (w *Content) Heading3(m Text, id string)

func (*Content) Heading4

func (w *Content) Heading4(m Text, id string)

func (*Content) Image

func (w *Content) Image(link string, alt string)

func (*Content) Markdown

func (w *Content) Markdown(s string)

func (*Content) OrderedList

func (w *Content) OrderedList(items []Text)

func (*Content) Para

func (w *Content) Para(m Text)

func (*Content) Pre

func (w *Content) Pre(s string)

func (*Content) String

func (e *Content) String() string

func (*Content) Text

func (e *Content) Text() Text

func (*Content) Timeline

func (w *Content) Timeline([]render.TimelineRow[Text])

func (*Content) UnorderedList

func (w *Content) UnorderedList(items []Text)

func (*Content) WriteTo

func (p *Content) WriteTo(w io.Writer) (int64, error)

type Document

type Document struct {
	Content
}

func (*Document) AppendText

func (d *Document) AppendText(t Text)

func (*Document) WriteTo

func (d *Document) WriteTo(w io.Writer) (int64, error)

type Text

type Text string

Text is a piece of pandoc markup text

func (Text) IsZero

func (m Text) IsZero() bool

func (Text) String

func (m Text) String() string

Jump to

Keyboard shortcuts

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