Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -73,6 +73,10 @@ func (s tableSite) isCell() bool {
|
||||
return s.table != nil && s.row != formatRow
|
||||
}
|
||||
|
||||
func (s tableSite) isFormat() bool {
|
||||
return s.table != nil && s.row == formatRow
|
||||
}
|
||||
|
||||
// label names the template at path in an error, a cell by its line in the rows file.
|
||||
func (s tableSite) label(path string) string {
|
||||
if s.isCell() {
|
||||
|
||||
@@ -263,7 +263,7 @@ func recordOf(n node) (*template, []Column, error) {
|
||||
// over sc's draws; a table's columns read the row pinned there.
|
||||
func renderRecord(s *generatorState, t *template, columns []Column, sc renderScope) *Record {
|
||||
sc = sc.in(t)
|
||||
if t.site.row == formatRow {
|
||||
if t.site.isFormat() {
|
||||
sc = sc.at(t.site.table.rowNode, &sc.groupDraws().pins)
|
||||
}
|
||||
r := &Record{columns: append([]Column(nil), columns...)}
|
||||
|
||||
@@ -201,7 +201,7 @@ func traceRead(trace renderTrace, t *template, sc renderScope, a arm) {
|
||||
switch {
|
||||
case t.site.isCell():
|
||||
row = renderedRow{t.site.table, t.site.row}
|
||||
case t.site.row == formatRow:
|
||||
case t.site.isFormat():
|
||||
row = renderedRow{t.site.table, sc.rowOf(t.site.table)}
|
||||
}
|
||||
trace(strings.Clone(sc.group), row, a)
|
||||
|
||||
Reference in New Issue
Block a user