package
0.0.0-20250207164621-7a1f277a159e
Repository: https://github.com/gomarkdown/markdown.git
Documentation: pkg.go.dev

# Functions

AppendChild appends child to children of parent It panics if either node is nil.
GetFirstChild returns first child of node n It's implemented as stand-alone function to keep Node interface small.
GetLastChild returns last child of node n It's implemented as stand-alone function to keep Node interface small.
GetNextNode returns next sibling of node n (node after n) We can't make it part of Container or Leaf because we loose Node identity.
GetPrevNode returns previous sibling of node n (node before n) We can't make it part of Container or Leaf because we loose Node identity.
Print is for debugging.
PrintWithPrefix is like Print but allows customizing prefix used for indentation.
RemoveFromTree removes this node from tree.
ToString is like Dump but returns result as a string.
Walk traverses tree recursively.
WalkFunc is like Walk but accepts just a callback function.

# Constants

These are all possible Document divisions.
These are all possible Document divisions.
These are all possible Document divisions.
These are all possible Document divisions.
GoToNext is the default traversal of every node.
TODO: figure out if this is of any use now.
These are the possible flag values for the ListItem renderer.
These are the possible flag values for the ListItem renderer.
These are the possible flag values for the ListItem renderer.
These are the possible flag values for the ListItem renderer.
These are the possible flag values for the ListItem renderer.
SkipChildren tells walker to skip all children of current node.
These are the possible flag values for the table cell renderer.
These are the possible flag values for the table cell renderer.
These are the possible flag values for the table cell renderer.
Terminate tells walker to terminate the traversal.

# Structs

Aside represents an markdown aside node.
An attribute can be attached to block elements.
BlockQuote represents markdown block quote node.
Callout is a node that can exist both in text (where it is an actual node) and in a code block.
Caption represents a figure, code or quote caption.
CaptionFigure is a node (blockquote or codeblock) that has a caption.
Citation is a citation node.
Code represents markdown code node.
CodeBlock represents markdown code block node.
Container is a type of node that can contain children.
CrossReference is a reference node.
Del represents markdown del node.
Document represents markdown document node, a root of ast.
DocumentMatter represents markdown node that signals a document division: frontmatter, mainmatter or backmatter.
Emph represents markdown emphasis node.
Footnotes is a node that contains all footnotes.
Hardbreak represents markdown hard break node.
Heading represents markdown heading node.
HorizontalRule represents markdown horizontal rule node.
HTMLBlock represents markdown html node.
HTMLSpan represents markdown html span node.
Image represents markdown image node.
Index is a node that contains an Index item and an optional, subitem.
Leaf is a type of node that cannot have children.
Link represents markdown link node.
List represents markdown list node.
ListItem represents markdown list item node.
Math represents markdown MathAjax inline node.
MathBlock represents markdown MathAjax block node.
NonBlockingSpace represents markdown non-blocking space node.
Paragraph represents markdown paragraph node.
Softbreak represents markdown softbreak node Note: not used currently.
Strong represents markdown strong node.
Subscript is a subscript node.
Subscript is a superscript node.
Table represents markdown table node.
TableBody represents markdown table body node.
TableCell represents markdown table cell node.
TableFooter represents markdown table foot node.
TableHeader represents markdown table head node.
TableRow represents markdown table row node.
Text represents markdown text node.

# Interfaces

return true if can contain children of a given node type used by custom nodes to over-ride logic in canNodeContain.
Node defines an ast node.
NodeVisitor is a callback to be called when traversing the syntax tree.

# Type aliases

CellAlignFlags holds a type of alignment in a table cell.
CitationTypes holds the type of a citation, informative, normative or suppressed.
DocumentMatters holds the type of a {front,main,back}matter in the document.
ListType contains bitwise or'ed flags for list and list item objects.
NodeVisitorFunc casts a function to match NodeVisitor interface.
WalkStatus allows NodeVisitor to have some control over the tree traversal.