Documentation
¶
Index ¶
- func Code(text string) string
- func EscapeMDX(s string) string
- type CodeBlock
- type Document
- func (d *Document) AddCodeBlock(language, code string)
- func (d *Document) AddFrontmatter(data map[string]string)
- func (d *Document) AddHeading(level int, text string)
- func (d *Document) AddListItem(text string)
- func (d *Document) AddNode(node Node)
- func (d *Document) AddParagraph(text string)
- func (d *Document) AddRaw(text string)
- func (d *Document) AddTable(table *Table)
- func (d *Document) Render() string
- type Heading
- type ListItem
- type Node
- type Paragraph
- type RawText
- type Section
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document represents a complete markdown document
func (*Document) AddCodeBlock ¶
AddCodeBlock adds a code block node
func (*Document) AddFrontmatter ¶
AddFrontmatter adds YAML frontmatter to the document
func (*Document) AddHeading ¶
AddHeading adds a heading node
func (*Document) AddListItem ¶
AddListItem adds a list item node
func (*Document) AddParagraph ¶
AddParagraph adds a paragraph node
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section represents a logical section with multiple nodes
func (*Section) AddCodeBlock ¶
AddCodeBlock adds a code block to the section
func (*Section) AddHeading ¶
AddHeading adds a heading to the section
func (*Section) AddListItem ¶
AddListItem adds a list item to the section
func (*Section) AddParagraph ¶
AddParagraph adds a paragraph to the section
Click to show internal directories.
Click to hide internal directories.