markdown

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoSuchBlockError = fmt.Errorf("no such block")

Functions

func ExtractAnnotatedBlock

func ExtractAnnotatedBlock(annotation string, s string) (string, error)

func SplitLines

func SplitLines(s string) []string

func ToListItem

func ToListItem(lines string) []string

Types

type Markdown

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

func Parse

func Parse(content string) *Markdown

func (*Markdown) AppendSection

func (m *Markdown) AppendSection(s *MarkdownSection)

func (*Markdown) FindSectionByHeading

func (m *Markdown) FindSectionByHeading(level int, headline string) *MarkdownSection

func (*Markdown) FindSectionByHeadingPrefix

func (m *Markdown) FindSectionByHeadingPrefix(level int, headlinePrefix string) *MarkdownSection

func (*Markdown) PrependSection

func (m *Markdown) PrependSection(s *MarkdownSection)

func (*Markdown) String

func (m *Markdown) String() string

type MarkdownSection

type MarkdownSection struct {
	Level        int
	Heading      string
	ContentLines []string
	SubSections  []*MarkdownSection
}

func (*MarkdownSection) AppendChild

func (m *MarkdownSection) AppendChild(child *MarkdownSection)

func (*MarkdownSection) AppendContent

func (m *MarkdownSection) AppendContent(contentLines []string)

func (*MarkdownSection) FindSectionByHeading

func (m *MarkdownSection) FindSectionByHeading(level int, headline string) *MarkdownSection

func (*MarkdownSection) PrependChild

func (m *MarkdownSection) PrependChild(child *MarkdownSection)

func (*MarkdownSection) PrependContent

func (m *MarkdownSection) PrependContent(contentLines []string)

func (*MarkdownSection) String

func (m *MarkdownSection) String() string

Jump to

Keyboard shortcuts

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