glossary

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package glossary edits spec/glossary.md. Parsing lives in repo; this package is the writing half. Every operation returns the rewritten page and leaves the file on disk alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(r *repo.Repo, term, definition string) ([]byte, error)

Add inserts a term in ascending case-insensitive order.

func Include

func Include(r *repo.Repo, source []byte, ids []string) ([]byte, error)

Include appends identifiers to the page's includes list, in the order given, skipping any already present. It takes source separately so that it can be applied to a page another operation has already rewritten.

func Remove

func Remove(r *repo.Repo, term string) ([]byte, error)

Remove deletes a term and its definition.

func Rename

func Rename(r *repo.Repo, from, to string) ([]byte, error)

Rename retitles a term, records the previous name, and re-sorts. It does not rewrite links elsewhere: the old anchor is gone, so L17 reports them, and they must then be corrected by hand. `archdoc link` cannot repair them. It expands [[...]] and deliberately never edits an existing markdown link, and [[<old name>]] does not resolve either, because Repo.Term keys on current headings and a recorded former name is not a term.

Types

This section is empty.

Jump to

Keyboard shortcuts

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