Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

md source pure

Functions 25

func Blockquote

1func Blockquote(text string) string
source

Blockquote returns a blockquote for markdown

func Bold

1func Bold(text string) string
source

Bold returns bold text for markdown

func BulletList

1func BulletList(items []string) string
source

BulletList returns an bullet list for markdown

func CodeBlock

1func CodeBlock(content string) string
source

CodeBlock creates a markdown code block

func EscapeMarkdown

1func EscapeMarkdown(text string) string
source

EscapeMarkdown escapes special markdown characters in a string

func Footnote

1func Footnote(reference, text string) string
source

Footnote returns a footnote for markdown

func H1

1func H1(text string) string
source

H1 returns a level 1 header for markdown

func H2

1func H2(text string) string
source

H2 returns a level 2 header for markdown

func H3

1func H3(text string) string
source

H3 returns a level 3 header for markdown

func H4

1func H4(text string) string
source

H4 returns a level 4 header for markdown

func H5

1func H5(text string) string
source

H5 returns a level 5 header for markdown

func H6

1func H6(text string) string
source

H6 returns a level 6 header for markdown

func HorizontalRule

1func HorizontalRule() string
source

HorizontalRule returns a horizontal rule for markdown

func Image

1func Image(altText, url string) string
source

Image returns an image for markdown

func InlineCode

1func InlineCode(code string) string
source

InlineCode returns inline code for markdown

func Italic

1func Italic(text string) string
source

Italic returns italicized text for markdown

func LanguageCodeBlock

1func LanguageCodeBlock(language, content string) string
source

LanguageCodeBlock creates a markdown code block with language-specific syntax highlighting

func LineBreak

1func LineBreak(count uint) string
source

LineBreak returns the specified number of line breaks for markdown

func OrderedList

1func OrderedList(items []string) string
source

OrderedList returns an ordered list for markdown

func Paragraph

1func Paragraph(content string) string
source

Paragraph wraps the given text in a Markdown paragraph

func Strikethrough

1func Strikethrough(text string) string
source

Strikethrough returns strikethrough text for markdown

func Table

1func Table(table MdTable) string
source

Table takes any MdTable implementation and returns its markdown representation

func TodoList

1func TodoList(items []string, done []bool) string
source

TodoList returns a list of todo items with checkboxes for markdown

func NewBuilder

1func NewBuilder() *Builder
source

NewBuilder creates a new Builder instance

Types 2

type Builder

struct
1type Builder struct {
2	elements []string
3}
source

Builder helps to build a Markdown string from individual elements

Methods on Builder

func Add

method on Builder
1func (m *Builder) Add(md ...string) *Builder
source

Add adds a Markdown element to the builder

func Render

method on Builder
1func (m *Builder) Render(separator string) string
source

Render returns the final Markdown string joined with the specified separator

type MdTable

interface
1type MdTable interface {
2	String() string
3}
source

MdTable is an interface for table types that can be converted to Markdown format

Imports 2

Source Files 3