Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DocGoKind = gast.NewNodeKind("gc")
DocGoKind is a `NodeKind` that needs to be registered to the goldmark parser, so that it can be properly marked and each AST walker can know the type of this node.
var DocgoExtension = &gcExtender{}
TaskList is an extension that allow you to use GFM task lists.
Functions ¶
func CleanPage ¶
CleanPage takes a Markdown source as an input and deletes AST nodes that wouldn't be useful for searching/metadata purposes.
func NewDocgoParser ¶
func NewDocgoParser() parser.InlineParser
func NewDocgoRenderer ¶
func NewDocgoRenderer(opts ...html.Option) renderer.NodeRenderer
NewDocgoRenderer returns a `NodeRenderer` instance capable of rendering Markdown for code documentation pages, containing annotations.
func RenderPage ¶
Renders a markdown source with GitHub flavor into HTML
func SplitPages ¶
Splits a single Markdown source string into N strings that represent Markdown sections. The sections are defined using Markdown annotations.
Types ¶
type DocGoNode ¶
type DocGoNode struct { gast.BaseInline Code string Attrs map[string]bool StringVars map[string]string IntVars map[string]int BoolVars map[string]bool LineStart int LineEnd int DecodeStatus string }
DocGoNode represents an AST node in the Markdown hierarchy. It contains annotations (that have attributes and begin/end marks) used later for rendering purposes.
type DocgoRenderer ¶
`DocgoRenderer` is an inline renderer that fetches the AST nodes containing docgo annotation and converts them to the appropriate HTML.
func (*DocgoRenderer) RegisterFuncs ¶
func (r *DocgoRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.