Documentation ¶
Index ¶
- type Builder
- func (b *Builder) AltH1(header string) *Builder
- func (b *Builder) AltH2(header string) *Builder
- func (b *Builder) BR() *Builder
- func (b *Builder) Block() *Builder
- func (b *Builder) Blockquote(text string) *Builder
- func (b *Builder) Bold(text string) string
- func (b *Builder) BulletedList(list ...interface{}) *Builder
- func (b *Builder) Code(code, lang string) *Builder
- func (b *Builder) CombinedEmphasis(text string) string
- func (b *Builder) Emphasis(text string) string
- func (b *Builder) H1(text string) *Builder
- func (b *Builder) H2(text string) *Builder
- func (b *Builder) H3(text string) *Builder
- func (b *Builder) H4(text string) *Builder
- func (b *Builder) H5(text string) *Builder
- func (b *Builder) H6(text string) *Builder
- func (b *Builder) HR() *Builder
- func (b *Builder) Image(url, title string) string
- func (b *Builder) InlineCode(code string) string
- func (b *Builder) Italic(text string) string
- func (b *Builder) Line(text string) *Builder
- func (b *Builder) Link(url, title string) string
- func (b *Builder) NumberedList(list ...interface{}) *Builder
- func (b *Builder) P(text string) *Builder
- func (b *Builder) Strikethrough(text string) string
- func (b *Builder) String() string
- func (b *Builder) StrongEmphasis(text string) string
- func (b *Builder) Table(table [][]string, align []TableAlignment) *Builder
- type TableAlignment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a simple Markdown builder that simplify the creation of content.
func (*Builder) Blockquote ¶
Blockquote adds a blockquote to the markdown.
func (*Builder) BulletedList ¶
BulletedList adds the given list as a bulleted list to the markdown.
func (*Builder) CombinedEmphasis ¶
CombinedEmphasis returns a bold/italic text.
func (*Builder) InlineCode ¶
InlineCode returns a quoted inline code.
func (*Builder) NumberedList ¶
NumberedList adds the given list as a numbered list to the markdown.
func (*Builder) Strikethrough ¶
Strikethrough returns a strikethrough inlined text.
func (*Builder) StrongEmphasis ¶
StrongEmphasis is an alias for Bold.
func (*Builder) Table ¶
func (b *Builder) Table(table [][]string, align []TableAlignment) *Builder
Table adds a table from the given two-dimensional interface array to the markdown content. The first row of the array is considered as the table header. Align represents the alignment of each column, left to right. If the alignment of a column is not defined, the rigth alignment will be used instead as default.
type TableAlignment ¶
type TableAlignment uint8
TableAlignment represents the alignment of a table cell.
const ( AlignLeft TableAlignment = iota AlignCenter AlignRight )
Alignment constants.