render

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtLine added in v0.3.0

func AtLine(doc *parser.Document, line int)

AtLine answers "what's at line N?" It finds the tightest containing node in the typed AST and prints its kind, location, containing section breadcrumb, and a short preview. Useful when an agent has a line number from elsewhere (a grep hit, a diff, an error) and needs to know what construct lives there.

func ChangedSince added in v0.3.0

func ChangedSince(doc *parser.Document, changed map[int]bool, ref string)

ChangedSince renders the sections and notables that intersect any line in `changed`. It's the CLI answer to "what changed in these docs since ref X?" — each hit shows its breadcrumb and the specific constructs that sit on changed lines.

func ExpandSection

func ExpandSection(doc *parser.Document, name string)

ExpandSection shows full content of a section

func FilteredTree

func FilteredTree(doc *parser.Document, filter string)

FilteredTree shows only sections matching the filter

func MultiTree

func MultiTree(docs []*parser.Document, dirName string)

MultiTree renders multiple documents as a combined directory view with aggregated inventory summary at the top and a per-file one-liner that surfaces each file's most signal-dense notables.

func RefsTree

func RefsTree(docs []*parser.Document, dirName string)

RefsTree renders document references (links to other .md files)

func SearchResults added in v0.2.0

func SearchResults(docs []*parser.Document, query string)

SearchResults searches all docs for sections matching the query and renders results

func Tree

func Tree(doc *parser.Document)

Tree renders the full document map

func TypeFilter added in v0.3.0

func TypeFilter(doc *parser.Document, kindName string)

TypeFilter drills down into a single node kind across the whole document. Equivalent to TypeFilterFiltered with no sub-filter.

func TypeFilterFiltered added in v0.3.0

func TypeFilterFiltered(doc *parser.Document, kindName, lang, variant string)

TypeFilterFiltered narrows the --type view further by an optional --lang (for code blocks) or --kind (for callout variants). Unmatched sub-filters are silently ignored when the kind doesn't support them.

Types

type SearchResult added in v0.2.0

type SearchResult struct {
	Filename string
	Path     string // e.g. "endpoints > Ban Member"
	Section  *parser.Section
}

SearchResult holds a matched section with its file context

func FindSearchResults added in v0.3.1

func FindSearchResults(docs []*parser.Document, query string) []SearchResult

FindSearchResults returns sections matching query using the same title, content, and typed-AST matching as the human renderer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL