{ $values { "block" block } { "?" boolean } }
{ $description "Tests if the block has no child sections." } ;
-HELP: if-nonempty
+HELP: unless-empty-block
{ $values { "block" block } { "quot" { $quotation ( block -- ) } } }
{ $description "If the block has child sections, calls the quotation, otherwise does nothing." } ;
! Long section layout algorithm
: chop-break ( seq -- seq )
- dup last line-break? [ but-last-slice chop-break ] when ;
+ [ dup last line-break? ] [ but-last-slice ] while ;
SYMBOL: prev
SYMBOL: next
: split-before ( section -- )
{
- [ start-group?>> prev get [ end-group?>> ] [ t ] if* and ]
+ [ start-group?>> prev get [ end-group?>> and ] when* ]
[ flow? prev get flow? not and ]
} 1|| split-groups ;