Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KindSection = ast.NewNodeKind("Section")
KindSection is the node kind for SectionNode
var SectionWrapper = NewSectionWrapper()
SectionWrapper is the default instance of sectionWrapper with default settings
Functions ¶
func NewSectionWrapper ¶ added in v0.1.0
func NewSectionWrapper(options ...SectionWrapperOption) *sectionWrapper
New creates a new sectionWrapper extension with default values and optional configurations
Types ¶
type SectionNode ¶
SectionNode represents a <section> element in the AST
func NewSectionNode ¶
func NewSectionNode(level int) *SectionNode
NewSectionNode creates a new SectionNode
func (*SectionNode) Dump ¶
func (n *SectionNode) Dump(source []byte, level int)
Dump dumps the SectionNode for debugging
func (*SectionNode) Kind ¶
func (n *SectionNode) Kind() ast.NodeKind
Kind returns the node kind for SectionNode
type SectionWrapperOption ¶ added in v0.1.0
type SectionWrapperOption func(*sectionWrapper)
SectionWrapperOption is a function type for configuring sectionWrapper
func WithCustomClass ¶ added in v0.1.0
func WithCustomClass(class string) SectionWrapperOption
WithCustomClass sets a custom class applied to all sections
func WithCustomClassPrefix ¶ added in v0.1.0
func WithCustomClassPrefix(prefix string) SectionWrapperOption
WithCustomClassPrefix sets a custom class prefix followed by heading level
func WithHeadingClass ¶ added in v0.1.0
func WithHeadingClass(enabled bool) SectionWrapperOption
WithHeadingClass enables h{level} classes
func WithSectionClass ¶ added in v0.1.0
func WithSectionClass(enabled bool) SectionWrapperOption
WithSectionClass enables section-h{level} classes