pager

package module
v0.0.0-...-82ddb55 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2015 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HTML_LEAD       = "<"
	YAML_LEAD       = "-"
	YAML_DELIM_UNIX = "---\n"
	YAML_DELIM_DOS  = "---\r\n"
	YAML_DELIM      = "---"
	TOML_LEAD       = "#"
	TOML_DELIM_UNIX = "###\n"
	TOML_DELIM_DOS  = "###\r\n"
	TOML_DELIM      = "###"
	HEAD_LEAD       = "+"
	HEAD_DELIM_UNIX = "+++\n"
	HEAD_DELIM_DOS  = "+++\r\n"
	HEAD_DELIM      = "+++"
	JSON_LEAD       = "{"
)

Variables

This section is empty.

Functions

func FormatSanitize

func FormatSanitize(kind string) string

func FormatToLeadRune

func FormatToLeadRune(kind string) rune

func HandleHeadMetaData

func HandleHeadMetaData(datum []byte) (interface{}, error)

func HandleJsonMetaData

func HandleJsonMetaData(datum []byte) (interface{}, error)

func HandleTomlMetaData

func HandleTomlMetaData(datum []byte) (interface{}, error)

func HandleYamlMetaData

func HandleYamlMetaData(datum []byte) (interface{}, error)

func InterfaceToConfig

func InterfaceToConfig(in interface{}, mark rune) ([]byte, error)

func InterfaceToFrontMatter

func InterfaceToFrontMatter(in interface{}, mark rune) ([]byte, error)

Types

type Content

type Content []byte

type FrontMatter

type FrontMatter []byte

type FrontmatterType

type FrontmatterType struct {
	Parse func([]byte) (interface{}, error)
	// contains filtered or unexported fields
}

func DetectFrontMatter

func DetectFrontMatter(mark rune) (f *FrontmatterType)

type Page

type Page interface {
	FrontMatter() FrontMatter
	Content() Content
	IsRenderable() bool
	Metadata() (interface{}, error)
}

func ReadFrom

func ReadFrom(r io.Reader) (p Page, err error)

ReadFrom reads the content from an io.Reader and constructs a page.

Jump to

Keyboard shortcuts

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