Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeBlockRule ¶
type CodeBlockRule struct {
}
CodeBlockRule validates code blocks using the hierarchical AST
func NewCodeBlockRule ¶
func NewCodeBlockRule() *CodeBlockRule
NewCodeBlockRule creates a new simplified code block rule
func (*CodeBlockRule) GenerateContent ¶
func (r *CodeBlockRule) GenerateContent(builder *strings.Builder, element schema.StructureElement) bool
GenerateContent generates placeholder code blocks for code block rules
func (*CodeBlockRule) ValidateWithContext ¶
func (r *CodeBlockRule) ValidateWithContext(ctx *vast.Context) []Violation
ValidateWithContext validates using VAST (validation-ready AST)
type ContextualRule ¶
type ContextualRule interface {
// Name returns the rule identifier
Name() string
// ValidateWithContext uses pre-established section-schema mappings via VAST
ValidateWithContext(ctx *vast.Context) []Violation
// GenerateContent generates markdown content for elements that match this rule
// Returns true if the rule handled content generation for this element
GenerateContent(builder *strings.Builder, element schema.StructureElement) bool
}
ContextualRule is an enhanced rule interface that uses pre-built VAST
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator creates markdown content using rules
func NewGenerator ¶
func NewGenerator() *Generator
NewGenerator creates a generator that uses the same rules as the validator
func (*Generator) GenerateContent ¶
func (g *Generator) GenerateContent(builder *strings.Builder, element schema.StructureElement)
GenerateContent generates content for an element using all applicable rules
type LinkValidationRule ¶ added in v0.3.0
type LinkValidationRule struct {
}
LinkValidationRule validates internal and external links in the document
func NewLinkValidationRule ¶ added in v0.3.0
func NewLinkValidationRule() *LinkValidationRule
NewLinkValidationRule creates a new link validation rule
func (*LinkValidationRule) GenerateContent ¶ added in v0.3.0
func (r *LinkValidationRule) GenerateContent(builder *strings.Builder, element schema.StructureElement) bool
GenerateContent generates placeholder content (links don't generate content)
func (*LinkValidationRule) Name ¶ added in v0.3.0
func (r *LinkValidationRule) Name() string
Name returns the rule identifier
func (*LinkValidationRule) ValidateWithContext ¶ added in v0.3.0
func (r *LinkValidationRule) ValidateWithContext(ctx *vast.Context) []Violation
ValidateWithContext validates links based on schema configuration
type RequiredTextRule ¶
type RequiredTextRule struct {
}
RequiredTextRule validates required text within sections
func NewRequiredTextRule ¶
func NewRequiredTextRule() *RequiredTextRule
NewRequiredTextRule creates a new section content rule
func (*RequiredTextRule) GenerateContent ¶
func (r *RequiredTextRule) GenerateContent(builder *strings.Builder, element schema.StructureElement) bool
GenerateContent generates placeholder content for required text rules
func (*RequiredTextRule) Name ¶
func (r *RequiredTextRule) Name() string
Name returns the rule identifier
func (*RequiredTextRule) ValidateWithContext ¶
func (r *RequiredTextRule) ValidateWithContext(ctx *vast.Context) []Violation
ValidateWithContext validates using VAST (validation-ready AST)
type StructureRule ¶
type StructureRule struct {
}
StructureRule validates document structure using the hierarchical AST
func NewStructureRule ¶
func NewStructureRule() *StructureRule
NewStructureRule creates a new simplified structure rule
func (*StructureRule) GenerateContent ¶
func (r *StructureRule) GenerateContent(builder *strings.Builder, element schema.StructureElement) bool
GenerateContent generates structural organization and ordering information
func (*StructureRule) ValidateWithContext ¶
func (r *StructureRule) ValidateWithContext(ctx *vast.Context) []Violation
ValidateWithContext validates using VAST (validation-ready AST)
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator manages and runs all rules
func NewValidator ¶
func NewValidator() *Validator
NewValidator creates a new validator with default rules for v0.1 DSL