markdown

package
v0.0.0-...-8c4cf57 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoAlign = iota
	AlignLeft
	AlignCenter
	AlignRight
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface {
	Markdown(io.Writer) error
}

func B

func B(blocks ...Block) Block

B renders a bold text block.

func CellP

func CellP(blocks ...Block) Block

CellP renders a paragraph for table cell.

func Code

func Code(code string) Block

func CodeBlock

func CodeBlock(code string, syntax ...string) Block

func G

func G(blocks ...Block) Block

func H1

func H1(blocks ...Block) Block

func H2

func H2(blocks ...Block) Block

func H3

func H3(blocks ...Block) Block

func H4

func H4(blocks ...Block) Block

func H5

func H5(blocks ...Block) Block

func H6

func H6(blocks ...Block) Block

func I

func I(blocks ...Block) Block

I renders an italic text block.

func Line

func Line() Block
func Link(href, label string) Block

func LinkToHeader

func LinkToHeader(hdr, label string) Block

func OL

func OL(block ...Block) Block

func P

func P(blocks ...Block) Block

P renders a paragraph.

func T

func T(s string) Block

T renders a plain text block.

func TB

func TB(s string) Block

func TH1

func TH1(s string) Block

func TH2

func TH2(s string) Block

func TH3

func TH3(s string) Block

func TH4

func TH4(s string) Block

func TH5

func TH5(s string) Block

func TH6

func TH6(s string) Block

func TI

func TI(s string) Block

func TP

func TP(s string) Block

func UL

func UL(block ...Block) Block

func Wrap

func Wrap(prefix, suffix []byte, blocks ...Block) Block

Wrap wraps another block with prefix & suffix.

type Document

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

func (*Document) Append

func (d *Document) Append(b ...Block)

func (*Document) Generate

func (d *Document) Generate(w io.Writer) error

type Table

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

func (*Table) AddColumn

func (t *Table) AddColumn(title string, align uint8)

func (*Table) AppendRow

func (t *Table) AppendRow(cols ...Block)

func (*Table) AppendRowT

func (t *Table) AppendRowT(cols ...string)

func (*Table) Markdown

func (t *Table) Markdown(w io.Writer) error

Jump to

Keyboard shortcuts

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