markdown

package
v0.0.0-...-9ebc2d1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEscape

func IsEscape(data []byte, i int) bool

IsEscape returns true if byte i is prefixed by an odd number of backslahses.

func RmvCr

func RmvCr(str []byte) []byte

func ToHTML

func ToHTML(content string) string

Types

type BlockQuote

type BlockQuote struct {
	Part
}

type Bold

type Bold struct {
	Part
}

type Chunk

type Chunk interface {
}

func ParseBlockQuote

func ParseBlockQuote(text []byte) ([]Chunk, int)

func ParseCode

func ParseCode(text []byte, start int) ([]Chunk, int)

func ParseEmph

func ParseEmph(text []byte, start int, eChar byte) ([]Chunk, int)

func ParseHeader

func ParseHeader(text []byte) Chunk

func ParseHighlight

func ParseHighlight(text []byte, start int) ([]Chunk, int)

func ParseInline

func ParseInline(line []byte) []Chunk
func ParseLink(text []byte, start int) ([]Chunk, int)

func ParseOList

func ParseOList(text []byte) (Chunk, int)
func ParseQuickLink(text []byte, start int) ([]Chunk, int)

func ParseStrikeThrough

func ParseStrikeThrough(text []byte, start int) ([]Chunk, int)

Extended syntax

func ParseSubScript

func ParseSubScript(text []byte, start int) ([]Chunk, int)

func ParseSuperScript

func ParseSuperScript(text []byte, start int) ([]Chunk, int)

func ParseUList

func ParseUList(text []byte) (Chunk, int)

func Tokenize

func Tokenize(content []byte) []Chunk

type Code

type Code struct {
	Part
}

Code

type CodeBlock

type CodeBlock struct {
	Part

	Language string
}

type Email

type Email Link

type Footnote

type Footnote struct {
	Part
}
type Header struct {
	Part

	Level int
}

type Highlight

type Highlight struct {
	Part
}

type HorizontalRule

type HorizontalRule struct {
}

type Image

type Image Link

type Italic

type Italic struct {
	Part
}
type Link struct {
	Part

	Path string
	Alt  string
}

Links

type List

type List struct {
	Part

	Ordered bool
	Defined bool
}

Lists

type ListItem

type ListItem struct {
	Part
}

type Paragraph

type Paragraph struct {
	Part
}

type Part

type Part struct {
	Value string

	// Metadata
	Children []Chunk
}

type PlainText

type PlainText struct {
	Part
}

type StrikeThrough

type StrikeThrough struct {
	Part
}

type Subscript

type Subscript struct {
	Part
}

type Superscript

type Superscript struct {
	Part
}

type Table

type Table struct {
	Part
}

Extended syntax

Jump to

Keyboard shortcuts

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