Build a table cell's template through compileString, and drop the done round item

This commit is contained in:
2026-09-28 23:41:22 +02:00
committed by Lillem4n
parent e257dc0e6e
commit 6158eb0f46
3 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -308,14 +308,14 @@ func (t *table) checkCells() error {
if strings.IndexByte(cell, '{') < 0 && strings.IndexByte(cell, '}') < 0 {
continue
}
toks, err := parseChecked(cell, nil)
n, err := compileString(cell, cellSite{t, row})
if err != nil {
return fmt.Errorf("line %d, %s: %w", row+2, t.header[col], err)
}
if t.cellTemplates == nil {
t.cellTemplates = map[int]*template{}
}
t.cellTemplates[i] = &template{format: cell, tokens: toks, repeat: 1, fromString: true, cell: cellSite{t, row}}
t.cellTemplates[i] = n
}
return nil
}