Documentation
¶
Index ¶
- Variables
- type RubyChild
- type RubyExtender
- type RubyHTMLRenderer
- func (r *RubyHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
- func (r *RubyHTMLRenderer) RenderRubyChild(w util.BufWriter, source []byte, node gast.Node, entering bool) (gast.WalkStatus, error)
- func (r *RubyHTMLRenderer) RenderRubyParent(w util.BufWriter, source []byte, node gast.Node, entering bool) (gast.WalkStatus, error)
- type RubyParent
- type RubyParser
Constants ¶
This section is empty.
Variables ¶
View Source
var KindRubyChild = gast.NewNodeKind("RubyChild")
View Source
var KindRubyParent = gast.NewNodeKind("RubyParent")
View Source
var Ruby = &RubyExtender{rpOpen: "", rpClose: ""}
Ruby is an extension that allow you to use various ruby expressions.
Functions ¶
This section is empty.
Types ¶
type RubyChild ¶
type RubyChild struct {
gast.BaseInline
BaseText []byte // BaseText is the text to be annotated.
RubyText []byte // RubyText is the annotation.
}
RubyChild node has the actual information of the ruby.
func NewRubyChild ¶
NewRubyChild returns a new RubyChild node.
type RubyExtender ¶
type RubyExtender struct {
// contains filtered or unexported fields
}
func (*RubyExtender) Extend ¶
func (e *RubyExtender) Extend(m goldmark.Markdown)
Extend implements goldmark.Extender.
type RubyHTMLRenderer ¶
type RubyHTMLRenderer struct {
RpOpen string // RpOpen is text for <rp> element before <rt> element.
RpClose string // RpClose is text for <rp> element after <rt> element.
}
func (*RubyHTMLRenderer) RegisterFuncs ¶
func (r *RubyHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs. It tells goldmark which render function to call when it encounters ruby nodes in the AST.
func (*RubyHTMLRenderer) RenderRubyChild ¶
func (r *RubyHTMLRenderer) RenderRubyChild(w util.BufWriter, source []byte, node gast.Node, entering bool) (gast.WalkStatus, error)
RenderRubyChild renders the provided RubyChild node.
func (*RubyHTMLRenderer) RenderRubyParent ¶
func (r *RubyHTMLRenderer) RenderRubyParent(w util.BufWriter, source []byte, node gast.Node, entering bool) (gast.WalkStatus, error)
RenderRubyParent renders the provided RubyParent node.
type RubyParent ¶
type RubyParent struct {
gast.BaseInline
}
RubyParent node holds RubyChild node(s). It itself has no special field.
func (*RubyParent) Dump ¶
func (n *RubyParent) Dump(source []byte, level int)
Dump dumps the RubyParent node to stdout for debugging.
Click to show internal directories.
Click to hide internal directories.