Versions in this module Expand all Collapse all v0 v0.1.7 Oct 14, 2026 v0.1.6 Oct 11, 2026 Changes in this version type Ref + func ScanLinks(lines []string, prefix string, f *Found, ...) []Ref v0.1.5 Oct 5, 2026 v0.1.4 Oct 4, 2026 v0.1.3 Oct 1, 2026 Changes in this version + var ErrBadTarget = errors.New("extract: target must be path#Symbol, path:line or path:start-end") + var ErrLinkDestination = errors.New(...) + var ErrUnclosedComment = errors.New("extract: directive comment is never closed") + func MultiLineDirective(lines []string, i int, st Style, head string) (text string, last int, ok bool) + func ParseSpan(d directive.Directive) (int, bool, error) + func Region(lines []string, from int, prefix string) *block.Region type Style + Trailing bool type Target + End int v0.1.2 Oct 1, 2026 v0.1.1 Oct 1, 2026 v0.1.0 Sep 30, 2026 Changes in this version + const Rule + const VerbBlock + const VerbCfg + const VerbChain + const VerbClaim + const VerbDef + const VerbRun + const VerbTable + const VerbURL + var BuiltinVerbs = []string + var ErrBadSpan = errors.New("extract: span= must be +N with N >= 0") + var ErrDefOnImage = errors.New("extract: ds:def on an image link defines nothing; use a text link") + var ErrLineOutOfRange = errors.New("extract: line out of range") + var ErrNoExtractor = errors.New("extract: no extractor matches this path") + var ErrNoID = errors.New("extract: ds:def without id=") + var ErrNothingToBind = errors.New("extract: ds:def has nothing after it to bind to") + var ErrSkippedCode = errors.New("extract: ds:def cannot bind the declaration below it") + var ErrSymbolNotFound = errors.New("extract: symbol not found") + var NoComments = map[string]bool + var Styles = map[string]Style + func CarrierLines(p string, lines []string) []string + func Carriers(p string, lines []string, prefix string) map[int]bool + func Enclosing(p string, src []byte, line int) (block.Block, error) + func Ext(p string) string + func Extensions() map[string][]string + func FirstCodeLine(p string, lines []string, from int) int + func HasNoComments(p string) bool + func HashedJoin(lines []string, start, end int, carriers map[int]bool) string + func IsProse(ex Extractor) bool + func Join(lines []string, start, end int) string + func Locate(p string, src []byte, t Target) (block.Block, error) + func NothingToBind(o Occurrence, f *Found) + func Prelude(o Occurrence, f *Found) (id string, span int, hasSpan, ok bool) + func SkippedCode(o Occurrence, f *Found, start int) + func SpanEnd(lines []string, start, want int, carriers map[int]bool) int + type Code struct + func (Code) Extract(p string, src []byte, prefix string) Found + func (Code) Match(p string) bool + func (Code) Name() string + type Config struct + func (Config) Extract(p string, src []byte, prefix string) Found + func (Config) Match(p string) bool + func (Config) Name() string + type Def struct + Block block.Block + Directive directive.Directive + Remote bool + func NewDef(o Occurrence, id string, kind block.Kind, symbol string, pos block.Position, ...) Def + type Document struct + func (Document) Extract(p string, src []byte, prefix string) Found + func (Document) Match(p string) bool + func (Document) Name() string + func (Document) Prose() bool + type Extractor interface + Extract func(path string, src []byte, prefix string) Found + Match func(path string) bool + Name func() string + type Found struct + Defs []Def + Page *Page + Problems []Problem + Refs []Ref + type Markdown struct + func (Markdown) Extract(p string, src []byte, prefix string) Found + func (Markdown) Match(p string) bool + func (Markdown) Name() string + func (Markdown) Prose() bool + type Occurrence struct + Carrier block.Carrier + Code string + Directive directive.Directive + Pos block.Position + Trailing bool + func ScanCode(p string, src []byte, prefix string, f *Found) (lines []string, defs []Occurrence) + type Page struct + Covers []string + ReviewEvery string + type Problem struct + Err error + Pos block.Position + type ProseTier interface + Prose func() bool + type Ref struct + Directive directive.Directive + Reference block.Reference + type Registry struct + func Default() *Registry + func NewRegistry(extractors ...Extractor) *Registry + func (r *Registry) Add(e Extractor) + func (r *Registry) For(p string) (Extractor, error) + func (r *Registry) Names() []string + func (r *Registry) Prepend(e Extractor) + type Style struct + AltClose string + AltOpen string + Bare bool + BlockClose string + BlockOpen string + Line []string + NoStrings bool + func StyleFor(p string) (Style, bool) + type Target struct + Line int + Prefix string + Symbol string + func ParseTarget(s string) (path string, t Target, err error) + type Text struct + func (Text) Extract(p string, src []byte, prefix string) Found + func (Text) Match(string) bool + func (Text) Name() string + func (Text) Prose() bool