I’m still stuck. I don’t see how I can have widget code to distinguish between #1 and #2 below. It seems like the slot widget should behave the same for both. I guess I could use the wikify widget to see if <$slot $name=ts-raw/> renders as empty, but that seems kind of ugly.
\widget $$mywidget()
<$slot $name=ts-raw>the body is empty</$slot>
\end
#<$$mywidget/>
#<$$mywidget></$$mywidget>
#<$$mywidget>the body is not empty</$$mywidget>
renders as
- the body is empty
- the body is not empty
Is it a bug in the slot widget or am I misunderstanding?