Versions in this module Expand all Collapse all v1 v1.3.2 Nov 21, 2020 v1.3.1 Nov 21, 2020 Changes in this version + var LinkReferenceParagraphTransformer = &linkReferenceParagraphTransformer + func DefaultBlockParsers() []util.PrioritizedValue + func DefaultInlineParsers() []util.PrioritizedValue + func DefaultParagraphTransformers() []util.PrioritizedValue + func ProcessDelimiters(bottom ast.Node, pc Context) + type ASTTransformer interface + Transform func(node *ast.Document, reader text.Reader, pc Context) + type Attribute struct + Name []byte + Value interface{} + type Attributes []Attribute + func ParseAttributes(reader text.Reader) (Attributes, bool) + func (as Attributes) Find(name []byte) (interface{}, bool) + type Block struct + Node ast.Node + Parser BlockParser + type BlockParser interface + CanAcceptIndentedLine func() bool + CanInterruptParagraph func() bool + Close func(node ast.Node, reader text.Reader, pc Context) + Continue func(node ast.Node, reader text.Reader, pc Context) State + Open func(parent ast.Node, reader text.Reader, pc Context) (ast.Node, State) + Trigger func() []byte + func NewATXHeadingParser(opts ...HeadingOption) BlockParser + func NewBlockquoteParser() BlockParser + func NewCodeBlockParser() BlockParser + func NewFencedCodeBlockParser() BlockParser + func NewHTMLBlockParser() BlockParser + func NewListItemParser() BlockParser + func NewListParser() BlockParser + func NewParagraphParser() BlockParser + func NewSetextHeadingParser(opts ...HeadingOption) BlockParser + func NewThematicBreakParser() BlockParser + type CloseBlocker interface + CloseBlock func(parent ast.Node, block text.Reader, pc Context) + type Config struct + ASTTransformers util.PrioritizedSlice + BlockParsers util.PrioritizedSlice + InlineParsers util.PrioritizedSlice + Options map[OptionName]interface{} + ParagraphTransformers util.PrioritizedSlice + func NewConfig() *Config + type Context interface + AddReference func(Reference) + BlockIndent func() int + BlockOffset func() int + ClearDelimiters func(bottom ast.Node) + FirstDelimiter func() *Delimiter + Get func(ContextKey) interface{} + IDs func() IDs + IsInLinkLabel func() bool + LastDelimiter func() *Delimiter + LastOpenedBlock func() Block + OpenedBlocks func() []Block + PushDelimiter func(delimiter *Delimiter) + Reference func(label string) (Reference, bool) + References func() []Reference + RemoveDelimiter func(d *Delimiter) + Set func(ContextKey, interface{}) + SetBlockIndent func(int) + SetBlockOffset func(int) + SetOpenedBlocks func([]Block) + String func() string + func NewContext(options ...ContextOption) Context + type ContextConfig struct + IDs IDs + type ContextKey int + var ContextKeyMax ContextKey + func NewContextKey() ContextKey + type ContextOption func(*ContextConfig) + func WithIDs(ids IDs) ContextOption + type Delimiter struct + CanClose bool + CanOpen bool + Char byte + Length int + NextDelimiter *Delimiter + OriginalLength int + PreviousDelimiter *Delimiter + Processor DelimiterProcessor + Segment text.Segment + func NewDelimiter(canOpen, canClose bool, length int, char byte, processor DelimiterProcessor) *Delimiter + func ScanDelimiter(line []byte, before rune, min int, processor DelimiterProcessor) *Delimiter + func (d *Delimiter) CalcComsumption(closer *Delimiter) int + func (d *Delimiter) ConsumeCharacters(n int) + func (d *Delimiter) Dump(source []byte, level int) + func (d *Delimiter) Inline() + func (d *Delimiter) Kind() ast.NodeKind + func (d *Delimiter) Text(source []byte) []byte + type DelimiterProcessor interface + CanOpenCloser func(opener, closer *Delimiter) bool + IsDelimiter func(byte) bool + OnMatch func(consumes int) ast.Node + type HeadingConfig struct + Attribute bool + AutoHeadingID bool + func (b *HeadingConfig) SetOption(name OptionName, value interface{}) + type HeadingOption interface + SetHeadingOption func(*HeadingConfig) + func WithAutoHeadingID() HeadingOption + func WithHeadingAttribute() HeadingOption + type IDs interface + Generate func(value []byte, kind ast.NodeKind) []byte + Put func(value []byte) + type InlineParser interface + Parse func(parent ast.Node, block text.Reader, pc Context) ast.Node + Trigger func() []byte + func NewAutoLinkParser() InlineParser + func NewCodeSpanParser() InlineParser + func NewEmphasisParser() InlineParser + func NewLinkParser() InlineParser + func NewRawHTMLParser() InlineParser + type Option interface + SetParserOption func(*Config) + func WithASTTransformers(ps ...util.PrioritizedValue) Option + func WithAttribute() Option + func WithBlockParsers(bs ...util.PrioritizedValue) Option + func WithInlineParsers(bs ...util.PrioritizedValue) Option + func WithOption(name OptionName, value interface{}) Option + func WithParagraphTransformers(ps ...util.PrioritizedValue) Option + type OptionName string + type ParagraphTransformer interface + Transform func(node *ast.Paragraph, reader text.Reader, pc Context) + type ParseConfig struct + Context Context + type ParseOption func(c *ParseConfig) + func WithContext(context Context) ParseOption + type Parser interface + AddOptions func(...Option) + Parse func(reader text.Reader, opts ...ParseOption) ast.Node + func NewParser(options ...Option) Parser + type Reference interface + Destination func() []byte + Label func() []byte + String func() string + Title func() []byte + func NewReference(label, destination, title []byte) Reference + type SetOptioner interface + SetOption func(name OptionName, value interface{}) + type State int + const Close + const Continue + const HasChildren + const NoChildren + const RequireParagraph