Documentation
¶
Index ¶
- Variables
- func NewBlockParser(parseDollars, parseSquare bool) parser.BlockParser
- func NewBlockRenderer(renderInternal *internal.RenderInternal) renderer.NodeRenderer
- func NewInlineDollarParser(enableInlineDollar bool) parser.InlineParser
- func NewInlineParenthesesParser() parser.InlineParser
- func NewInlineRenderer(renderInternal *internal.RenderInternal) renderer.NodeRenderer
- type Block
- type BlockRenderer
- type Extension
- type Inline
- type InlineRenderer
- type Options
Constants ¶
This section is empty.
Variables ¶
var KindBlock = ast.NewNodeKind("MathBlock")
KindBlock is the node kind for math blocks
var KindInline = ast.NewNodeKind("MathInline")
KindInline is the kind for math inline
Functions ¶
func NewBlockParser ¶
func NewBlockParser(parseDollars, parseSquare bool) parser.BlockParser
NewBlockParser creates a new math BlockParser
func NewBlockRenderer ¶
func NewBlockRenderer(renderInternal *internal.RenderInternal) renderer.NodeRenderer
NewBlockRenderer creates a new renderer for math Blocks
func NewInlineDollarParser ¶
func NewInlineDollarParser(enableInlineDollar bool) parser.InlineParser
func NewInlineParenthesesParser ¶
func NewInlineParenthesesParser() parser.InlineParser
func NewInlineRenderer ¶
func NewInlineRenderer(renderInternal *internal.RenderInternal) renderer.NodeRenderer
NewInlineRenderer returns a new renderer for inline math
Types ¶
type Block ¶
Block represents a display math block e.g. $$...$$ or \[...\]
func (*Block) Dump ¶
Dump dumps the block to a string
func (*Block) IsRaw ¶
IsRaw returns true as this block should not be processed further
type BlockRenderer ¶
type BlockRenderer struct {
// contains filtered or unexported fields
}
BlockRenderer represents a renderer for math Blocks
func (*BlockRenderer) RegisterFuncs ¶
func (r *BlockRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs registers the renderer for math Blocks
type Extension ¶
type Extension struct {
// contains filtered or unexported fields
}
Extension is a math extension
func NewExtension ¶
func NewExtension(renderInternal *internal.RenderInternal, opts ...Options) *Extension
NewExtension creates a new math extension with the provided options
type Inline ¶
type Inline struct {
ast.BaseInline
}
Inline struct represents inline math e.g. $...$ or \(...\)
func (*Inline) Dump ¶
Dump renders this inline math as debug
func (*Inline) IsBlank ¶
IsBlank returns if this inline node is empty
type InlineRenderer ¶
type InlineRenderer struct {
// contains filtered or unexported fields
}
InlineRenderer is an inline renderer
func (*InlineRenderer) RegisterFuncs ¶
func (r *InlineRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs registers the renderer for inline math nodes
Source Files
¶
- block_node.go
- block_parser.go
- block_renderer.go
- inline_node.go
- inline_parser.go
- inline_renderer.go
- math.go