diff --git a/CHANGELOG.md b/CHANGELOG.md index 5556b4c..1497e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ replacement, and each removed path, column or flag. table above it, a table whose format or cell references its own family, and, within one render and draw group, a path drawing a table another path selects a row of, or two paths pinning different rows of one table. Two reads are held to one - draw only where a render can pin both their rows: a path read pins a row's ancestors - with it, while a table read whole draws a row and pins none. + draw only where both their rows can render together: a path read pins a row's + ancestors with it, while a table read whole draws a row and pins none. - `New` refuses a root choice of templates sharing one format and one set of string fields, naming the rows TSV to write instead. - `misc.territory`, `misc.currency`, `misc.language`, `misc.httpstatus` and diff --git a/README.md b/README.md index cb29fa1..bdec463 100644 --- a/README.md +++ b/README.md @@ -1141,8 +1141,8 @@ the Development section below, and who ships a register the four above then draw row and a cell in another never meet, and each may select its own row of another table; the cells of one row, and whatever they reach, do meet, and so does the format beside them. The rule the fence applies is that two reads meet unless they - sit in two rows of one table, or in rows no render pins at once: a path read pins a - row's ancestors with it, while a table read whole draws a row and pins none. A + sit in two rows of one table, or in rows that never render together: a path read + pins a row's ancestors with it, while a table read whole draws a row and pins none. A choice's items get no such treatment yet: two items selecting different rows are still refused. - **A table never reaches its own family, by any route.** A `repeat` iteration and a diff --git a/draw.go b/draw.go index 8f4a893..7e7726a 100644 --- a/draw.go +++ b/draw.go @@ -297,7 +297,7 @@ type drawAt struct { group string route drawRoute alt rowSet - drawn *table + drawn *table // only that table's own cells read it, which the own-family fence is what keeps true, so the visit keys leave it out } // rowSet is the rows a walk entered, one per table: only one row of a table renders, so reads in @@ -404,7 +404,9 @@ func (w *drawWalk) walk(n node, at drawAt) { if at.alt.excludes(cell) { continue } - w.edge(n, e, drawAt{at.group, at.route, at.alt.enter(cell.cellOf, cell.cellRow, cell.cellOf != at.drawn), at.drawn}) + in := at + in.alt = at.alt.enter(cell.cellOf, cell.cellRow, cell.cellOf != at.drawn) + w.edge(n, e, in) continue } w.edge(n, e, at) diff --git a/todo.md b/todo.md index b43f905..f42d777 100644 --- a/todo.md +++ b/todo.md @@ -153,6 +153,10 @@ by a `data-import/` script, as README goal 12 asks. ### Library and CLI +- Hold two whole reads of one table to one row, or refuse the pair: `{/region}|{/region}` + draws a row for each read, so cells of two rows render together while the fence counts + them alternatives and compares neither — a bare `{/addr}` in one row beside + `{/addr.city}` in another is the overlap it refuses everywhere else. - Name a spelling that works when a row selector misses: `misc.protocol[tcp]`, `misc.httpmethod[get]` and `misc.territory[se]` all answer "no row … has key or name" and stop there, where a case-insensitive match could name the row that exists, and a