Documentation
¶
Overview ¶
Package linerange parses the `lines=` fragment a citation uses to show part of a block: `a-b` or `a`, 1-based and inclusive.
It lives here because three readers need the same grammar: the checker judges a citation, the renderer slices it, and `ds read --lines` returns it. They had one copy each and drifted — the reader rejected `lines=3`, which the other two accepted, and took `2-3xyz`, which they refused — so a citation could render in a doc and fail when an assistant read it.
The ledger's stored `lines` column is a different thing and has its own parser: it must accept `1-0`, the range of an empty file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBad = errors.New("bad lines")
ErrBad is returned for any fragment outside the grammar.
Functions ¶
Types ¶
This section is empty.