Closed matklad closed 1 year ago
Thanks, I didn't know you could do that in ts! (I guess this ts's version of a tuple type?)
I think the Row/Caption idea you suggest is probably a good idea. We could have the renderer omit the <caption>
tag when the caption is empty. No harm in it showing up as a node in the AST. Do you want to do a separate PR for that?
Yeah, will look into caption later today!
It seems like the following should also in principle work:
Though, that'll require us to add an empty caption in the parser, like we already do for definition lists.
Alternatively, we can use
Counter-intuitively, this doesn't mean that the array can start with ethire Row or Caption. Rather, it means that the first element is either Caption or underfined. This would violate the invariant that
children: AstNode[]
, so this one definitely seems like a no-go.