include

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Type directive.Type = "include"

Variables

This section is empty.

Functions

func IncludedNode added in v0.3.0

func IncludedNode(n ast.Node) (ast.Node, bool)

func IncludedSource added in v0.3.0

func IncludedSource(n ast.Node) ([]byte, bool)

Types

type MarkdownRenderer

type MarkdownRenderer struct {
}

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 {
	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 {
	Parser     parser.Parser
	SourcePath resolver.Path
}

func (*NodeTransformer) Transform

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

Transform implements directive.NodeTransformer.

Jump to

Keyboard shortcuts

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