markdownish

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

TODO What does utf8.DecodeRuneInString("") return? I hope utf8.RuneError, but probably just '\x00'?

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeaderExtra

func HeaderExtra(atom Atom) (key string, val string, ok bool)

func IsEmptyParagraph

func IsEmptyParagraph(atom Atom) bool

func Md2Man

func Md2Man(cnf *ManConfig, md *Md) string

Types

type Atom

type Atom interface {
	// contains filtered or unexported methods
}

type Blockquote

type Blockquote struct {
	Quoted []Atom
}

e-mail quotes coincide syntactically with markdown blockquotes

type Br

type Br struct{}

type Code

type Code struct {
	Lang string
	Text string
}

TODO rename to "Codeblock"

type Header struct {
	// 1 to 6
	Level      int
	Whitespace string

	// TODO change to "Text []LineAtoms"
	Text string
}

type LineAtom

type LineAtom interface {
	// contains filtered or unexported methods
}
type Link struct {
	// Link should be a parseable URL (or an e-mail address)
	Text, Link, Title string
}

type ManConfig

type ManConfig struct {
	Environment map[string]string
}

type Md

type Md struct {
	Atoms []Atom
}

func Parse deprecated

func Parse(mediatype string, r io.Reader) (*Md, error)

Deprecated: TODO

func (*Md) MarshalText

func (md *Md) MarshalText() ([]byte, error)

func (*Md) UnmarshalText

func (md *Md) UnmarshalText(text []byte) error

type Paragraph

type Paragraph struct {
	LineAtoms []LineAtom
}

type Text

type Text struct {
	Text string

	Code         bool
	Italic, Bold bool
}

Jump to

Keyboard shortcuts

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