prettyprint: a bit more cleanup.
parent
9a642531e0
commit
a563f92b27
|
@ -154,7 +154,7 @@ HELP: empty-block?
|
||||||
{ $values { "block" block } { "?" boolean } }
|
{ $values { "block" block } { "?" boolean } }
|
||||||
{ $description "Tests if the block has no child sections." } ;
|
{ $description "Tests if the block has no child sections." } ;
|
||||||
|
|
||||||
HELP: if-nonempty
|
HELP: unless-empty-block
|
||||||
{ $values { "block" block } { "quot" { $quotation ( block -- ) } } }
|
{ $values { "block" block } { "quot" { $quotation ( block -- ) } } }
|
||||||
{ $description "If the block has child sections, calls the quotation, otherwise does nothing." } ;
|
{ $description "If the block has child sections, calls the quotation, otherwise does nothing." } ;
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ M: colon unindent-first-line? drop t ;
|
||||||
|
|
||||||
! Long section layout algorithm
|
! Long section layout algorithm
|
||||||
: chop-break ( seq -- seq )
|
: 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: prev
|
||||||
SYMBOL: next
|
SYMBOL: next
|
||||||
|
@ -314,7 +314,7 @@ SYMBOL: next
|
||||||
|
|
||||||
: split-before ( section -- )
|
: 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 ]
|
[ flow? prev get flow? not and ]
|
||||||
} 1|| split-groups ;
|
} 1|| split-groups ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue