parse

package
v0.0.0-...-56ad08b Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadingTitle

func HeadingTitle(n *blackfriday.Node) string

HeadingTitle returns the title of the heading by returning the Literal of its first child.

func IsHeading

func IsHeading(n *blackfriday.Node) bool

IsHeading returns true if node is type heading.

func Label

func Label(node *blackfriday.Node) string

Label returns a label for the node. Label is "Node.Type\n\Node.String()".

func PrintHeading

func PrintHeading(n *blackfriday.Node) string

PrintHeading returns the information of a Heading node.

func PrintNode

func PrintNode(n *blackfriday.Node) string

PrintNode returns a string representation of the node.

func RichText

func RichText(input string) string

RichText returns a string with the formatted rich text section.

func Viz

func Viz(graph *gographviz.Graph, graphName, parentID string, node *blackfriday.Node)

Viz adds a node to the graph and adds an edge to its parent.

Types

type RawHeading

type RawHeading struct {
	Title   string
	Content string
}

RawHeading represents a heading, raw content, and subheadings (if any).

func Heading

func Heading(content string, level int) (fi []RawHeading, err error)

Heading reads a markdown string and returns a slice of RawHeadings.

Jump to

Keyboard shortcuts

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