Skip the row loop of a column walk when a table has no token cells, and scan a cell for braces by byte

This commit is contained in:
2026-09-18 00:26:58 +02:00
parent 8c005070ec
commit 7993e04d95
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ func (t *table) checkCells() error {
if (col == t.key || col == t.name) && strings.ContainsAny(cell, inSelector) {
return fmt.Errorf("line %d: %s %q contains %q, which a selector cannot spell", row+2, t.columns[col], cell, cell[strings.IndexAny(cell, inSelector):][:1])
}
if !strings.ContainsAny(cell, "{}") {
if strings.IndexByte(cell, '{') < 0 && strings.IndexByte(cell, '}') < 0 {
continue
}
n, err := compileString(cell)