render

package
v0.1.4-0...-8b98d0b Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(content string) ast.Node

Parse parses markdown content to AST, with rat unique ast nodes, like tokens.

Types

type JSONRenderer

type JSONRenderer struct {
	// contains filtered or unexported fields
}

JSONRenderer renders a nodes markdown content to JSON representation of the markdown AST.

func NewJSONRenderer

func NewJSONRenderer(
	log *logr.LogR,
	provider graph.Provider,
	resolver *urlresolve.Resolver,
) *JSONRenderer

NewJSONRenderer creates a new JSONRenderer.

func (*JSONRenderer) Render

func (jr *JSONRenderer) Render(
	root *jsonast.AstPart,
	n *graph.Node,
	data string,
)

Render renders the markdown content of the specified node to JSON.

type RatErrorNode

type RatErrorNode struct {
	ast.Leaf
	Err error
}

RatErrorNode markdown ast node for rat errors.

type RatTokenNode

type RatTokenNode struct {
	ast.Leaf
	Token *token.Token
}

RatTokenNode markdown ast node for rat tokens.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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