I created some convenience table functions to make headers automatically fill colums (this is for recreating a template in Typst), but now some cases started breaking in Typst 0.14.0. The code basically takes the table apart and recreates the children.
The code is quite long, so I put it onto a project in the webapp.
Is there something I can do to make this work again in 0.14.0? I have found nothing related in the changelog, is this a regression?
I was able to reproduce it with a smaller example. The following compiles with 0.11.0 to 0.13.1, but not 0.14.0:
#show table: it => {
// Collect old data
let fields = it.fields()
// Children have to be treated separately as they are given as positional arguments
let old_children = fields.remove("children")
let children = ()
// Style table cells
let modified = false
for c in old_children {
if c.body.text == "A" {
modified = true
children.push(table.cell(colspan: 2, [Blub]))
} else {
children.push(c)
}
}
// Prevent infinite recursion
if modified {
// Rebuild table
it.func()(..fields, ..children)
} else {
it
}
}
#table(
columns: 2 * (1cm,),
[A], table.cell(colspan: 2, [B]),
)
Older versions produce

while 0.14.0 throws
error: cell's colspan would cause it to exceed the available column(s)
┌─ test.typ:31:7
│
31 │ [A], table.cell(colspan: 2, [B]),
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
│
= hint: try placing the cell in another position or reducing its colspan
I also opened a bug report, but is there any workaround?