I can reproduce your description, and I notice that the following weak spaces are collapsed correctly.
#list(
{
h(1em, weak: true)
$1/2$
},
$1/2$,
{
show math.equation.where(block: false): it => h(1em, weak: true) + it
$1/2$
},
)
More tests:
#list(
{
h(1em, weak: true)
$1/2$ // good
parbreak()
},
{
show math.equation.where(block: false): it => h(1em, weak: true) + it
$1/2$ // bad
parbreak()
},
{
show math.equation.where(block: false): it => h(1em, weak: true) + it
$1/2$ // good
},
{
block({
h(1em, weak: true)
$1/2$ // good
})
parbreak()
},
{
h(0.000000000001em)
h(1em, weak: true)
$1/2$ // bad, but expected
parbreak()
},
)
(Tested with typst v0.15.0-rc.1, v0.14.2, v0.14.0)
EDIT:
Oh, you should link to Why h function make list or enum so weird? - #2 by gezepi, which already explained many things!
EDIT 2:
Please add cross links!

