include

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Type directive.Type = "include"

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkdownRenderer

type MarkdownRenderer struct {
	Cache *SourceCache
}

func (*MarkdownRenderer) Render

func (mr *MarkdownRenderer) Render(r *markdown.Render, directive *directive.Node, entering bool) (ast.WalkStatus, error)

Render implements markdown.NodeRenderer.

type Node

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

func (*Node) AppendChild

func (n *Node) AppendChild(self ast.Node, child ast.Node)

AppendChild implements ast.Node.

func (*Node) Attribute

func (n *Node) Attribute(name []byte) (interface{}, bool)

Attribute implements ast.Node.

func (*Node) AttributeString

func (n *Node) AttributeString(name string) (interface{}, bool)

AttributeString implements ast.Node.

func (*Node) Attributes

func (n *Node) Attributes() []ast.Attribute

Attributes implements ast.Node.

func (*Node) ChildCount

func (n *Node) ChildCount() int

ChildCount implements ast.Node.

func (*Node) Dump

func (n *Node) Dump(source []byte, level int)

Dump implements ast.Node.

func (*Node) FirstChild

func (n *Node) FirstChild() ast.Node

FirstChild implements ast.Node.

func (*Node) HasBlankPreviousLines

func (n *Node) HasBlankPreviousLines() bool

HasBlankPreviousLines implements ast.Node.

func (*Node) HasChildren

func (n *Node) HasChildren() bool

HasChildren implements ast.Node.

func (*Node) InsertAfter

func (n *Node) InsertAfter(self ast.Node, v1 ast.Node, insertee ast.Node)

InsertAfter implements ast.Node.

func (*Node) InsertBefore

func (n *Node) InsertBefore(self ast.Node, v1 ast.Node, insertee ast.Node)

InsertBefore implements ast.Node.

func (*Node) IsRaw

func (n *Node) IsRaw() bool

IsRaw implements ast.Node.

func (*Node) Kind

func (n *Node) Kind() ast.NodeKind

Kind implements ast.Node.

func (*Node) LastChild

func (n *Node) LastChild() ast.Node

LastChild implements ast.Node.

func (*Node) Lines

func (n *Node) Lines() *text.Segments

Lines implements ast.Node.

func (*Node) NextSibling

func (n *Node) NextSibling() ast.Node

NextSibling implements ast.Node.

func (*Node) OwnerDocument

func (n *Node) OwnerDocument() *ast.Document

OwnerDocument implements ast.Node.

func (*Node) Parent

func (n *Node) Parent() ast.Node

Parent implements ast.Node.

func (*Node) PreviousSibling

func (n *Node) PreviousSibling() ast.Node

PreviousSibling implements ast.Node.

func (*Node) RemoveAttributes

func (n *Node) RemoveAttributes()

RemoveAttributes implements ast.Node.

func (*Node) RemoveChild

func (n *Node) RemoveChild(self ast.Node, child ast.Node)

RemoveChild implements ast.Node.

func (*Node) RemoveChildren

func (n *Node) RemoveChildren(self ast.Node)

RemoveChildren implements ast.Node.

func (*Node) ReplaceChild

func (n *Node) ReplaceChild(self ast.Node, v1 ast.Node, insertee ast.Node)

ReplaceChild implements ast.Node.

func (*Node) SetAttribute

func (n *Node) SetAttribute(name []byte, value interface{})

SetAttribute implements ast.Node.

func (*Node) SetAttributeString

func (n *Node) SetAttributeString(name string, value interface{})

SetAttributeString implements ast.Node.

func (*Node) SetBlankPreviousLines

func (n *Node) SetBlankPreviousLines(v bool)

SetBlankPreviousLines implements ast.Node.

func (*Node) SetLines

func (n *Node) SetLines(segments *text.Segments)

SetLines implements ast.Node.

func (*Node) SetNextSibling

func (n *Node) SetNextSibling(next ast.Node)

SetNextSibling implements ast.Node.

func (*Node) SetParent

func (n *Node) SetParent(parent ast.Node)

SetParent implements ast.Node.

func (*Node) SetPreviousSibling

func (n *Node) SetPreviousSibling(ast.Node)

SetPreviousSibling implements ast.Node.

func (*Node) SortChildren

func (n *Node) SortChildren(comparator func(n1 ast.Node, n2 ast.Node) int)

SortChildren implements ast.Node.

func (*Node) Text

func (n *Node) Text(source []byte) []byte

Text implements ast.Node.

func (*Node) Type

func (n *Node) Type() ast.NodeType

Type implements ast.Node.

type NodeRenderer

type NodeRenderer struct {
	Cache    *SourceCache
	Renderer renderer.Renderer
}

func (*NodeRenderer) Render

func (r *NodeRenderer) Render(writer util.BufWriter, source []byte, node *directive.Node)

Render implements directive.NodeRenderer.

type NodeTransformer

type NodeTransformer struct {
	Cache     *SourceCache
	Parser    parser.Parser
	SourceURL *url.URL
}

func (*NodeTransformer) Transform

func (t *NodeTransformer) Transform(node *directive.Node, reader text.Reader, pc parser.Context)

Transform implements directive.NodeTransformer.

type SourceCache

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

func NewSourceCache

func NewSourceCache() *SourceCache

func (*SourceCache) Get

func (c *SourceCache) Get(path string) ([]byte, ast.Node, bool)

func (*SourceCache) Set

func (c *SourceCache) Set(path string, data []byte, node ast.Node)

Jump to

Keyboard shortcuts

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