markdown

package
v53.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderLink(name, link string) string

RenderLink returns a rendered markdown link

Types

type Table

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

Table describes a table in a markdown document

func NewTable

func NewTable(alignment string, headers ...string) *Table

NewTable creates a new table with given alignments and headers

func (*Table) AddRow

func (t *Table) AddRow(items ...string)

AddRow adds a new row to the table

func (*Table) Columns

func (t *Table) Columns() int

Columns returns the number of columns in this table

func (*Table) Rows

func (t *Table) Rows() int

Rows returns the number of rows in this table

func (*Table) String

func (t *Table) String() string

String outputs the markdown table to a string

type Writer

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

Writer is a writer to write contents in markdown format

func (*Writer) EmptyLine

func (md *Writer) EmptyLine()

EmptyLine inserts an empty line to the markdown document

func (*Writer) String

func (md *Writer) String() string

String outputs the markdown document as a string

func (*Writer) WriteHeader

func (md *Writer) WriteHeader(h string)

WriteHeader writes a header to the markdown document

func (*Writer) WriteLine

func (md *Writer) WriteLine(s string)

WriteLine writes a line to the markdown document

func (*Writer) WriteSubheader

func (md *Writer) WriteSubheader(sh string)

WriteSubheader writes a sub-header to the markdown document

func (*Writer) WriteTable

func (md *Writer) WriteTable(table Table)

WriteTable writes a table to the markdown document

func (*Writer) WriteTitle

func (md *Writer) WriteTitle(h string)

WriteTitle writes a title to the markdown document

func (*Writer) WriteTopLevelHeader

func (md *Writer) WriteTopLevelHeader(h string)

WriteTopLevelHeader writes a header to the markdown document

Jump to

Keyboard shortcuts

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