Versions in this module Expand all Collapse all v0 v0.3.0 Feb 9, 2026 v0.2.0 Feb 9, 2026 Changes in this version + func DetectFileType(path string) string + func IsBinary(content []byte) bool + func IsValidUTF8(content []byte) bool + func StripBOM(content []byte) []byte + func StripFrontmatter(content []byte) ([]byte, string, string) + type ComponentType string + const ComponentTypeCode + const ComponentTypeDocumentation + const ComponentTypeNone + type Export struct + Line int + Name string + Type string + type Heading struct + Level int + Line int + Text string + type MDXParser struct + func NewMDXParser() *MDXParser + func (p *MDXParser) CanParse(path string) bool + func (p *MDXParser) Parse(_ string, content []byte) (*ParseResult, error) + type MarkdownParser struct + func NewMarkdownParser() *MarkdownParser + func (p *MarkdownParser) CanParse(path string) bool + func (p *MarkdownParser) Parse(_ string, content []byte) (*ParseResult, error) + type Outline struct + Exports []Export + Headings []Heading + Type OutlineType + type OutlineType string + const OutlineTypeExports + const OutlineTypeHeadings + const OutlineTypeNone + type ParseResult struct + ComponentType ComponentType + Description string + Lines int + Outline *Outline + type Parser interface + CanParse func(path string) bool + Parse func(path string, content []byte) (*ParseResult, error) + type TextParser struct + func NewTextParser() *TextParser + func (p *TextParser) CanParse(path string) bool + func (p *TextParser) Parse(_ string, content []byte) (*ParseResult, error) + type TypeScriptParser struct + func NewTypeScriptParser() *TypeScriptParser + func (p *TypeScriptParser) CanParse(path string) bool + func (p *TypeScriptParser) Parse(_ string, content []byte) (*ParseResult, error)