Documentation ¶
Overview ¶
Package preprocess converts a markdown document into a tree of headings for easy querying.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KindTreeBranch = ast.NewNodeKind("TreeBranch")
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct { Doc TreeBranch Source []byte }
A markdown document parsed into a tree of goldmark AST nodes.
type TreeBranch ¶
type TreeBranch struct { ast.BaseInline TreeParent *TreeBranch Level int }
Represents a branch in the document tree, triggered by a heading. This is also implements goldmark/ast.Node, so it can be used with AST tools.
func NewTreeBranch ¶
func NewTreeBranch(heading *ast.Heading, parent *TreeBranch) *TreeBranch
func NewTreeBranchRoot ¶
func NewTreeBranchRoot() *TreeBranch
A tree branch for the root of the document.
func (*TreeBranch) Dump ¶
func (n *TreeBranch) Dump(source []byte, level int)
func (*TreeBranch) Kind ¶
func (n *TreeBranch) Kind() ast.NodeKind
Click to show internal directories.
Click to hide internal directories.