markdown

package module
v0.0.0-...-a8f1390 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: BSD-2-Clause Imports: 14 Imported by: 120

README

This repository has moved to gitlab.com/golang-commonmark/markdown.

Documentation

Overview

Package markdown provides CommonMark-compliant markdown parser and renderer.

Index

Constants

View Source
const (
	AlignNone = iota
	AlignLeft
	AlignCenter
	AlignRight
)

Variables

This section is empty.

Functions

func Breaks

func Breaks(b bool) option

func HTML

func HTML(b bool) option

func LangPrefix

func LangPrefix(p string) option

func Linkify

func Linkify(b bool) option

func MaxNesting

func MaxNesting(n int) option

func Nofollow

func Nofollow(b bool) option

func Quotes

func Quotes(stringOrArray interface{}) option

func RegisterBlockRule

func RegisterBlockRule(id int, rule BlockRule, terminates []int)

func RegisterCoreRule

func RegisterCoreRule(id int, rule CoreRule)

func RegisterInlineRule

func RegisterInlineRule(id int, rule InlineRule)

func RegisterPostprocessRule

func RegisterPostprocessRule(id int, rule PostprocessRule)

func Tables

func Tables(b bool) option

func Typographer

func Typographer(b bool) option

func XHTMLOutput

func XHTMLOutput(b bool) option

Types

type Align

type Align byte

func (Align) String

func (a Align) String() string

type BlockRule

type BlockRule func(*StateBlock, int, int, bool) bool

type BlockquoteClose

type BlockquoteClose struct {
	Lvl int
}

func (*BlockquoteClose) Block

func (t *BlockquoteClose) Block() bool

func (*BlockquoteClose) Closing

func (t *BlockquoteClose) Closing() bool

func (*BlockquoteClose) Level

func (t *BlockquoteClose) Level() int

func (*BlockquoteClose) Opening

func (t *BlockquoteClose) Opening() bool

func (*BlockquoteClose) SetLevel

func (t *BlockquoteClose) SetLevel(lvl int)

func (*BlockquoteClose) Tag

func (t *BlockquoteClose) Tag() string

type BlockquoteOpen

type BlockquoteOpen struct {
	Map [2]int
	Lvl int
}

func (*BlockquoteOpen) Block

func (t *BlockquoteOpen) Block() bool

func (*BlockquoteOpen) Closing

func (t *BlockquoteOpen) Closing() bool

func (*BlockquoteOpen) Level

func (t *BlockquoteOpen) Level() int

func (*BlockquoteOpen) Opening

func (t *BlockquoteOpen) Opening() bool

func (*BlockquoteOpen) SetLevel

func (t *BlockquoteOpen) SetLevel(lvl int)

func (*BlockquoteOpen) Tag

func (t *BlockquoteOpen) Tag() string

type BulletListClose

type BulletListClose struct {
	Lvl int
}

func (*BulletListClose) Block

func (t *BulletListClose) Block() bool

func (*BulletListClose) Closing

func (t *BulletListClose) Closing() bool

func (*BulletListClose) Level

func (t *BulletListClose) Level() int

func (*BulletListClose) Opening

func (t *BulletListClose) Opening() bool

func (*BulletListClose) SetLevel

func (t *BulletListClose) SetLevel(lvl int)

func (*BulletListClose) Tag

func (t *BulletListClose) Tag() string

type BulletListOpen

type BulletListOpen struct {
	Map [2]int
	Lvl int
}

func (*BulletListOpen) Block

func (t *BulletListOpen) Block() bool

func (*BulletListOpen) Closing

func (t *BulletListOpen) Closing() bool

func (*BulletListOpen) Level

func (t *BulletListOpen) Level() int

func (*BulletListOpen) Opening

func (t *BulletListOpen) Opening() bool

func (*BulletListOpen) SetLevel

func (t *BulletListOpen) SetLevel(lvl int)

func (*BulletListOpen) Tag

func (t *BulletListOpen) Tag() string

type CodeBlock

type CodeBlock struct {
	Content string
	Map     [2]int
	Lvl     int
}

func (*CodeBlock) Block

func (t *CodeBlock) Block() bool

func (*CodeBlock) Closing

func (t *CodeBlock) Closing() bool

func (*CodeBlock) Level

func (t *CodeBlock) Level() int

func (*CodeBlock) Opening

func (t *CodeBlock) Opening() bool

func (*CodeBlock) SetLevel

func (t *CodeBlock) SetLevel(lvl int)

func (*CodeBlock) Tag

func (t *CodeBlock) Tag() string

type CodeInline

type CodeInline struct {
	Content string
	Lvl     int
}

func (*CodeInline) Block

func (t *CodeInline) Block() bool

func (*CodeInline) Closing

func (t *CodeInline) Closing() bool

func (*CodeInline) Level

func (t *CodeInline) Level() int

func (*CodeInline) Opening

func (t *CodeInline) Opening() bool

func (*CodeInline) SetLevel

func (t *CodeInline) SetLevel(lvl int)

func (*CodeInline) Tag

func (t *CodeInline) Tag() string

type CoreRule

type CoreRule func(*StateCore)

type Delimiter

type Delimiter struct {
	Length int
	Jump   int
	Token  int
	Level  int
	End    int
	Open   bool
	Close  bool
	Marker byte
}

type EmphasisClose

type EmphasisClose struct {
	Lvl int
}

func (*EmphasisClose) Block

func (t *EmphasisClose) Block() bool

func (*EmphasisClose) Closing

func (t *EmphasisClose) Closing() bool

func (*EmphasisClose) Level

func (t *EmphasisClose) Level() int

func (*EmphasisClose) Opening

func (t *EmphasisClose) Opening() bool

func (*EmphasisClose) SetLevel

func (t *EmphasisClose) SetLevel(lvl int)

func (*EmphasisClose) Tag

func (t *EmphasisClose) Tag() string

type EmphasisOpen

type EmphasisOpen struct {
	Lvl int
}

func (*EmphasisOpen) Block

func (t *EmphasisOpen) Block() bool

func (*EmphasisOpen) Closing

func (t *EmphasisOpen) Closing() bool

func (*EmphasisOpen) Level

func (t *EmphasisOpen) Level() int

func (*EmphasisOpen) Opening

func (t *EmphasisOpen) Opening() bool

func (*EmphasisOpen) SetLevel

func (t *EmphasisOpen) SetLevel(lvl int)

func (*EmphasisOpen) Tag

func (t *EmphasisOpen) Tag() string

type Environment

type Environment struct {
	References map[string]map[string]string
}

type Fence

type Fence struct {
	Params  string
	Content string
	Map     [2]int
	Lvl     int
}

func (*Fence) Block

func (t *Fence) Block() bool

func (*Fence) Closing

func (t *Fence) Closing() bool

func (*Fence) Level

func (t *Fence) Level() int

func (*Fence) Opening

func (t *Fence) Opening() bool

func (*Fence) SetLevel

func (t *Fence) SetLevel(lvl int)

func (*Fence) Tag

func (t *Fence) Tag() string

type HTMLBlock

type HTMLBlock struct {
	Content string
	Map     [2]int
	Lvl     int
}

func (*HTMLBlock) Block

func (t *HTMLBlock) Block() bool

func (*HTMLBlock) Closing

func (t *HTMLBlock) Closing() bool

func (*HTMLBlock) Level

func (t *HTMLBlock) Level() int

func (*HTMLBlock) Opening

func (t *HTMLBlock) Opening() bool

func (*HTMLBlock) SetLevel

func (t *HTMLBlock) SetLevel(lvl int)

func (*HTMLBlock) Tag

func (t *HTMLBlock) Tag() string

type HTMLInline

type HTMLInline struct {
	Content string
	Lvl     int
}

func (*HTMLInline) Block

func (t *HTMLInline) Block() bool

func (*HTMLInline) Closing

func (t *HTMLInline) Closing() bool

func (*HTMLInline) Level

func (t *HTMLInline) Level() int

func (*HTMLInline) Opening

func (t *HTMLInline) Opening() bool

func (*HTMLInline) SetLevel

func (t *HTMLInline) SetLevel(lvl int)

func (*HTMLInline) Tag

func (t *HTMLInline) Tag() string

type Hardbreak

type Hardbreak struct {
	Lvl int
}

func (*Hardbreak) Block

func (t *Hardbreak) Block() bool

func (*Hardbreak) Closing

func (t *Hardbreak) Closing() bool

func (*Hardbreak) Level

func (t *Hardbreak) Level() int

func (*Hardbreak) Opening

func (t *Hardbreak) Opening() bool

func (*Hardbreak) SetLevel

func (t *Hardbreak) SetLevel(lvl int)

func (*Hardbreak) Tag

func (t *Hardbreak) Tag() string

type HeadingClose

type HeadingClose struct {
	HLevel int
	Lvl    int
}

func (*HeadingClose) Block

func (t *HeadingClose) Block() bool

func (*HeadingClose) Closing

func (t *HeadingClose) Closing() bool

func (*HeadingClose) Level

func (t *HeadingClose) Level() int

func (*HeadingClose) Opening

func (t *HeadingClose) Opening() bool

func (*HeadingClose) SetLevel

func (t *HeadingClose) SetLevel(lvl int)

func (*HeadingClose) Tag

func (t *HeadingClose) Tag() string

type HeadingOpen

type HeadingOpen struct {
	HLevel int
	Map    [2]int
	Lvl    int
}

func (*HeadingOpen) Block

func (t *HeadingOpen) Block() bool

func (*HeadingOpen) Closing

func (t *HeadingOpen) Closing() bool

func (*HeadingOpen) Level

func (t *HeadingOpen) Level() int

func (*HeadingOpen) Opening

func (t *HeadingOpen) Opening() bool

func (*HeadingOpen) SetLevel

func (t *HeadingOpen) SetLevel(lvl int)

func (*HeadingOpen) Tag

func (t *HeadingOpen) Tag() string

type Hr

type Hr struct {
	Map [2]int
	Lvl int
}

func (*Hr) Block

func (t *Hr) Block() bool

func (*Hr) Closing

func (t *Hr) Closing() bool

func (*Hr) Level

func (t *Hr) Level() int

func (*Hr) Opening

func (t *Hr) Opening() bool

func (*Hr) SetLevel

func (t *Hr) SetLevel(lvl int)

func (*Hr) Tag

func (t *Hr) Tag() string

type Image

type Image struct {
	Src    string
	Title  string
	Tokens []Token
	Lvl    int
}

func (*Image) Block

func (t *Image) Block() bool

func (*Image) Closing

func (t *Image) Closing() bool

func (*Image) Level

func (t *Image) Level() int

func (*Image) Opening

func (t *Image) Opening() bool

func (*Image) SetLevel

func (t *Image) SetLevel(lvl int)

func (*Image) Tag

func (t *Image) Tag() string

type Inline

type Inline struct {
	Content  string
	Map      [2]int
	Children []Token
	Lvl      int
}

func (*Inline) Block

func (t *Inline) Block() bool

func (*Inline) Closing

func (t *Inline) Closing() bool

func (*Inline) Level

func (t *Inline) Level() int

func (*Inline) Opening

func (t *Inline) Opening() bool

func (*Inline) SetLevel

func (t *Inline) SetLevel(lvl int)

func (*Inline) Tag

func (t *Inline) Tag() string

type InlineRule

type InlineRule func(*StateInline, bool) bool

type LinkClose

type LinkClose struct {
	Lvl int
}

func (*LinkClose) Block

func (t *LinkClose) Block() bool

func (*LinkClose) Closing

func (t *LinkClose) Closing() bool

func (*LinkClose) Level

func (t *LinkClose) Level() int

func (*LinkClose) Opening

func (t *LinkClose) Opening() bool

func (*LinkClose) SetLevel

func (t *LinkClose) SetLevel(lvl int)

func (*LinkClose) Tag

func (t *LinkClose) Tag() string

type LinkOpen

type LinkOpen struct {
	Href   string
	Title  string
	Target string
	Lvl    int
}

func (*LinkOpen) Block

func (t *LinkOpen) Block() bool

func (*LinkOpen) Closing

func (t *LinkOpen) Closing() bool

func (*LinkOpen) Level

func (t *LinkOpen) Level() int

func (*LinkOpen) Opening

func (t *LinkOpen) Opening() bool

func (*LinkOpen) SetLevel

func (t *LinkOpen) SetLevel(lvl int)

func (*LinkOpen) Tag

func (t *LinkOpen) Tag() string

type ListItemClose

type ListItemClose struct {
	Lvl int
}

func (*ListItemClose) Block

func (t *ListItemClose) Block() bool

func (*ListItemClose) Closing

func (t *ListItemClose) Closing() bool

func (*ListItemClose) Level

func (t *ListItemClose) Level() int

func (*ListItemClose) Opening

func (t *ListItemClose) Opening() bool

func (*ListItemClose) SetLevel

func (t *ListItemClose) SetLevel(lvl int)

func (*ListItemClose) Tag

func (t *ListItemClose) Tag() string

type ListItemOpen

type ListItemOpen struct {
	Map [2]int
	Lvl int
}

func (*ListItemOpen) Block

func (t *ListItemOpen) Block() bool

func (*ListItemOpen) Closing

func (t *ListItemOpen) Closing() bool

func (*ListItemOpen) Level

func (t *ListItemOpen) Level() int

func (*ListItemOpen) Opening

func (t *ListItemOpen) Opening() bool

func (*ListItemOpen) SetLevel

func (t *ListItemOpen) SetLevel(lvl int)

func (*ListItemOpen) Tag

func (t *ListItemOpen) Tag() string

type Markdown

type Markdown struct {
	Block  ParserBlock
	Inline ParserInline
	// contains filtered or unexported fields
}

func New

func New(opts ...option) *Markdown

func (*Markdown) Parse

func (m *Markdown) Parse(src []byte) []Token

func (*Markdown) Render

func (m *Markdown) Render(w io.Writer, src []byte) error

func (*Markdown) RenderToString

func (m *Markdown) RenderToString(src []byte) string

func (*Markdown) RenderTokens

func (m *Markdown) RenderTokens(w io.Writer, tokens []Token) error

func (*Markdown) RenderTokensToString

func (m *Markdown) RenderTokensToString(tokens []Token) string

type OrderedListClose

type OrderedListClose struct {
	Lvl int
}

func (*OrderedListClose) Block

func (t *OrderedListClose) Block() bool

func (*OrderedListClose) Closing

func (t *OrderedListClose) Closing() bool

func (*OrderedListClose) Level

func (t *OrderedListClose) Level() int

func (*OrderedListClose) Opening

func (t *OrderedListClose) Opening() bool

func (*OrderedListClose) SetLevel

func (t *OrderedListClose) SetLevel(lvl int)

func (*OrderedListClose) Tag

func (t *OrderedListClose) Tag() string

type OrderedListOpen

type OrderedListOpen struct {
	Order int
	Map   [2]int
	Lvl   int
}

func (*OrderedListOpen) Block

func (t *OrderedListOpen) Block() bool

func (*OrderedListOpen) Closing

func (t *OrderedListOpen) Closing() bool

func (*OrderedListOpen) Level

func (t *OrderedListOpen) Level() int

func (*OrderedListOpen) Opening

func (t *OrderedListOpen) Opening() bool

func (*OrderedListOpen) SetLevel

func (t *OrderedListOpen) SetLevel(lvl int)

func (*OrderedListOpen) Tag

func (t *OrderedListOpen) Tag() string

type ParagraphClose

type ParagraphClose struct {
	Tight  bool
	Hidden bool
	Lvl    int
}

func (*ParagraphClose) Block

func (t *ParagraphClose) Block() bool

func (*ParagraphClose) Closing

func (t *ParagraphClose) Closing() bool

func (*ParagraphClose) Level

func (t *ParagraphClose) Level() int

func (*ParagraphClose) Opening

func (t *ParagraphClose) Opening() bool

func (*ParagraphClose) SetLevel

func (t *ParagraphClose) SetLevel(lvl int)

func (*ParagraphClose) Tag

func (t *ParagraphClose) Tag() string

type ParagraphOpen

type ParagraphOpen struct {
	Tight  bool
	Hidden bool
	Map    [2]int
	Lvl    int
}

func (*ParagraphOpen) Block

func (t *ParagraphOpen) Block() bool

func (*ParagraphOpen) Closing

func (t *ParagraphOpen) Closing() bool

func (*ParagraphOpen) Level

func (t *ParagraphOpen) Level() int

func (*ParagraphOpen) Opening

func (t *ParagraphOpen) Opening() bool

func (*ParagraphOpen) SetLevel

func (t *ParagraphOpen) SetLevel(lvl int)

func (*ParagraphOpen) Tag

func (t *ParagraphOpen) Tag() string

type ParserBlock

type ParserBlock struct{}

func (ParserBlock) Parse

func (b ParserBlock) Parse(src []byte, md *Markdown, env *Environment) []Token

func (ParserBlock) Tokenize

func (ParserBlock) Tokenize(s *StateBlock, startLine, endLine int)

type ParserInline

type ParserInline struct {
}

func (ParserInline) Parse

func (i ParserInline) Parse(src string, md *Markdown, env *Environment) []Token

func (ParserInline) SkipToken

func (ParserInline) SkipToken(s *StateInline)

func (ParserInline) Tokenize

func (ParserInline) Tokenize(s *StateInline)

type PostprocessRule

type PostprocessRule func(*StateInline)

type RenderOptions

type RenderOptions struct {
	LangPrefix string // CSS language class prefix for fenced blocks
	XHTML      bool   // render as XHTML instead of HTML
	Breaks     bool   // convert \n in paragraphs into <br>
	Nofollow   bool   // add rel="nofollow" to the links
}

type Renderer

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

func NewRenderer

func NewRenderer(w io.Writer) *Renderer

func (*Renderer) Render

func (r *Renderer) Render(tokens []Token, options RenderOptions) error

type Softbreak

type Softbreak struct {
	Lvl int
}

func (*Softbreak) Block

func (t *Softbreak) Block() bool

func (*Softbreak) Closing

func (t *Softbreak) Closing() bool

func (*Softbreak) Level

func (t *Softbreak) Level() int

func (*Softbreak) Opening

func (t *Softbreak) Opening() bool

func (*Softbreak) SetLevel

func (t *Softbreak) SetLevel(lvl int)

func (*Softbreak) Tag

func (t *Softbreak) Tag() string

type StateBlock

type StateBlock struct {
	StateCore

	BMarks     []int // offsets of the line beginnings
	EMarks     []int // offsets of the line endings
	TShift     []int // indents for each line
	SCount     []int
	BSCount    []int
	BlkIndent  int  // required block content indent (in a list etc.)
	Line       int  // line index in the source string
	LineMax    int  // number of lines
	Tight      bool // loose or tight mode for lists
	ParentType byte // parent block type
	Level      int
}

func (*StateBlock) IsLineEmpty

func (s *StateBlock) IsLineEmpty(n int) bool

func (*StateBlock) Lines

func (s *StateBlock) Lines(begin, end, indent int, keepLastLf bool) string

func (*StateBlock) PushClosingToken

func (s *StateBlock) PushClosingToken(tok Token)

func (*StateBlock) PushOpeningToken

func (s *StateBlock) PushOpeningToken(tok Token)

func (*StateBlock) PushToken

func (s *StateBlock) PushToken(tok Token)

func (*StateBlock) SkipBytes

func (s *StateBlock) SkipBytes(pos int, b byte) int

func (*StateBlock) SkipBytesBack

func (s *StateBlock) SkipBytesBack(pos int, b byte, min int) int

func (*StateBlock) SkipEmptyLines

func (s *StateBlock) SkipEmptyLines(from int) int

func (*StateBlock) SkipSpaces

func (s *StateBlock) SkipSpaces(pos int) int

func (*StateBlock) SkipSpacesBack

func (s *StateBlock) SkipSpacesBack(pos int, min int) int

type StateCore

type StateCore struct {
	Src    string
	Tokens []Token

	Md  *Markdown
	Env *Environment
	// contains filtered or unexported fields
}

type StateInline

type StateInline struct {
	StateCore

	Pos          int
	PosMax       int
	Level        int
	Pending      bytes.Buffer
	PendingLevel int
	Delimiters   []Delimiter

	Cache map[int]int
}

func (*StateInline) PushClosingToken

func (s *StateInline) PushClosingToken(tok Token)

func (*StateInline) PushOpeningToken

func (s *StateInline) PushOpeningToken(tok Token)

func (*StateInline) PushPending

func (s *StateInline) PushPending()

func (*StateInline) PushToken

func (s *StateInline) PushToken(tok Token)

type StrikethroughClose

type StrikethroughClose struct {
	Lvl int
}

func (*StrikethroughClose) Block

func (t *StrikethroughClose) Block() bool

func (*StrikethroughClose) Closing

func (t *StrikethroughClose) Closing() bool

func (*StrikethroughClose) Level

func (t *StrikethroughClose) Level() int

func (*StrikethroughClose) Opening

func (t *StrikethroughClose) Opening() bool

func (*StrikethroughClose) SetLevel

func (t *StrikethroughClose) SetLevel(lvl int)

func (*StrikethroughClose) Tag

func (t *StrikethroughClose) Tag() string

type StrikethroughOpen

type StrikethroughOpen struct {
	Lvl int
}

func (*StrikethroughOpen) Block

func (t *StrikethroughOpen) Block() bool

func (*StrikethroughOpen) Closing

func (t *StrikethroughOpen) Closing() bool

func (*StrikethroughOpen) Level

func (t *StrikethroughOpen) Level() int

func (*StrikethroughOpen) Opening

func (t *StrikethroughOpen) Opening() bool

func (*StrikethroughOpen) SetLevel

func (t *StrikethroughOpen) SetLevel(lvl int)

func (*StrikethroughOpen) Tag

func (t *StrikethroughOpen) Tag() string

type StrongClose

type StrongClose struct {
	Lvl int
}

func (*StrongClose) Block

func (t *StrongClose) Block() bool

func (*StrongClose) Closing

func (t *StrongClose) Closing() bool

func (*StrongClose) Level

func (t *StrongClose) Level() int

func (*StrongClose) Opening

func (t *StrongClose) Opening() bool

func (*StrongClose) SetLevel

func (t *StrongClose) SetLevel(lvl int)

func (*StrongClose) Tag

func (t *StrongClose) Tag() string

type StrongOpen

type StrongOpen struct {
	Lvl int
}

func (*StrongOpen) Block

func (t *StrongOpen) Block() bool

func (*StrongOpen) Closing

func (t *StrongOpen) Closing() bool

func (*StrongOpen) Level

func (t *StrongOpen) Level() int

func (*StrongOpen) Opening

func (t *StrongOpen) Opening() bool

func (*StrongOpen) SetLevel

func (t *StrongOpen) SetLevel(lvl int)

func (*StrongOpen) Tag

func (t *StrongOpen) Tag() string

type TableClose

type TableClose struct {
	Lvl int
}

func (*TableClose) Block

func (t *TableClose) Block() bool

func (*TableClose) Closing

func (t *TableClose) Closing() bool

func (*TableClose) Level

func (t *TableClose) Level() int

func (*TableClose) Opening

func (t *TableClose) Opening() bool

func (*TableClose) SetLevel

func (t *TableClose) SetLevel(lvl int)

func (*TableClose) Tag

func (t *TableClose) Tag() string

type TableOpen

type TableOpen struct {
	Map [2]int
	Lvl int
}

func (*TableOpen) Block

func (t *TableOpen) Block() bool

func (*TableOpen) Closing

func (t *TableOpen) Closing() bool

func (*TableOpen) Level

func (t *TableOpen) Level() int

func (*TableOpen) Opening

func (t *TableOpen) Opening() bool

func (*TableOpen) SetLevel

func (t *TableOpen) SetLevel(lvl int)

func (*TableOpen) Tag

func (t *TableOpen) Tag() string

type TbodyClose

type TbodyClose struct {
	Lvl int
}

func (*TbodyClose) Block

func (t *TbodyClose) Block() bool

func (*TbodyClose) Closing

func (t *TbodyClose) Closing() bool

func (*TbodyClose) Level

func (t *TbodyClose) Level() int

func (*TbodyClose) Opening

func (t *TbodyClose) Opening() bool

func (*TbodyClose) SetLevel

func (t *TbodyClose) SetLevel(lvl int)

func (*TbodyClose) Tag

func (t *TbodyClose) Tag() string

type TbodyOpen

type TbodyOpen struct {
	Map [2]int
	Lvl int
}

func (*TbodyOpen) Block

func (t *TbodyOpen) Block() bool

func (*TbodyOpen) Closing

func (t *TbodyOpen) Closing() bool

func (*TbodyOpen) Level

func (t *TbodyOpen) Level() int

func (*TbodyOpen) Opening

func (t *TbodyOpen) Opening() bool

func (*TbodyOpen) SetLevel

func (t *TbodyOpen) SetLevel(lvl int)

func (*TbodyOpen) Tag

func (t *TbodyOpen) Tag() string

type TdClose

type TdClose struct {
	Lvl int
}

func (*TdClose) Block

func (t *TdClose) Block() bool

func (*TdClose) Closing

func (t *TdClose) Closing() bool

func (*TdClose) Level

func (t *TdClose) Level() int

func (*TdClose) Opening

func (t *TdClose) Opening() bool

func (*TdClose) SetLevel

func (t *TdClose) SetLevel(lvl int)

func (*TdClose) Tag

func (t *TdClose) Tag() string

type TdOpen

type TdOpen struct {
	Align Align
	Map   [2]int
	Lvl   int
}

func (*TdOpen) Block

func (t *TdOpen) Block() bool

func (*TdOpen) Closing

func (t *TdOpen) Closing() bool

func (*TdOpen) Level

func (t *TdOpen) Level() int

func (*TdOpen) Opening

func (t *TdOpen) Opening() bool

func (*TdOpen) SetLevel

func (t *TdOpen) SetLevel(lvl int)

func (*TdOpen) Tag

func (t *TdOpen) Tag() string

type Text

type Text struct {
	Content string
	Lvl     int
}

func (*Text) Block

func (t *Text) Block() bool

func (*Text) Closing

func (t *Text) Closing() bool

func (*Text) Level

func (t *Text) Level() int

func (*Text) Opening

func (t *Text) Opening() bool

func (*Text) SetLevel

func (t *Text) SetLevel(lvl int)

func (*Text) Tag

func (t *Text) Tag() string

type ThClose

type ThClose struct {
	Lvl int
}

func (*ThClose) Block

func (t *ThClose) Block() bool

func (*ThClose) Closing

func (t *ThClose) Closing() bool

func (*ThClose) Level

func (t *ThClose) Level() int

func (*ThClose) Opening

func (t *ThClose) Opening() bool

func (*ThClose) SetLevel

func (t *ThClose) SetLevel(lvl int)

func (*ThClose) Tag

func (t *ThClose) Tag() string

type ThOpen

type ThOpen struct {
	Align Align
	Map   [2]int
	Lvl   int
}

func (*ThOpen) Block

func (t *ThOpen) Block() bool

func (*ThOpen) Closing

func (t *ThOpen) Closing() bool

func (*ThOpen) Level

func (t *ThOpen) Level() int

func (*ThOpen) Opening

func (t *ThOpen) Opening() bool

func (*ThOpen) SetLevel

func (t *ThOpen) SetLevel(lvl int)

func (*ThOpen) Tag

func (t *ThOpen) Tag() string

type TheadClose

type TheadClose struct {
	Lvl int
}

func (*TheadClose) Block

func (t *TheadClose) Block() bool

func (*TheadClose) Closing

func (t *TheadClose) Closing() bool

func (*TheadClose) Level

func (t *TheadClose) Level() int

func (*TheadClose) Opening

func (t *TheadClose) Opening() bool

func (*TheadClose) SetLevel

func (t *TheadClose) SetLevel(lvl int)

func (*TheadClose) Tag

func (t *TheadClose) Tag() string

type TheadOpen

type TheadOpen struct {
	Map [2]int
	Lvl int
}

func (*TheadOpen) Block

func (t *TheadOpen) Block() bool

func (*TheadOpen) Closing

func (t *TheadOpen) Closing() bool

func (*TheadOpen) Level

func (t *TheadOpen) Level() int

func (*TheadOpen) Opening

func (t *TheadOpen) Opening() bool

func (*TheadOpen) SetLevel

func (t *TheadOpen) SetLevel(lvl int)

func (*TheadOpen) Tag

func (t *TheadOpen) Tag() string

type Token

type Token interface {
	Tag() string
	Opening() bool
	Closing() bool
	Block() bool
	Level() int
	SetLevel(lvl int)
}

type TrClose

type TrClose struct {
	Lvl int
}

func (*TrClose) Block

func (t *TrClose) Block() bool

func (*TrClose) Closing

func (t *TrClose) Closing() bool

func (*TrClose) Level

func (t *TrClose) Level() int

func (*TrClose) Opening

func (t *TrClose) Opening() bool

func (*TrClose) SetLevel

func (t *TrClose) SetLevel(lvl int)

func (*TrClose) Tag

func (t *TrClose) Tag() string

type TrOpen

type TrOpen struct {
	Map [2]int
	Lvl int
}

func (*TrOpen) Block

func (t *TrOpen) Block() bool

func (*TrOpen) Closing

func (t *TrOpen) Closing() bool

func (*TrOpen) Level

func (t *TrOpen) Level() int

func (*TrOpen) Opening

func (t *TrOpen) Opening() bool

func (*TrOpen) SetLevel

func (t *TrOpen) SetLevel(lvl int)

func (*TrOpen) Tag

func (t *TrOpen) Tag() string

Jump to

Keyboard shortcuts

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