HELP: long-section
{ $values { "section" section } }
-{ $contract "Prints a section which spans multiple lines. This should use a layout strategy maximizing readability and minimizing line length." } ;
+{ $contract "Prints a section which spans multiple lines. This should use a layout strategy maximizing readability and minimizing line length. Default implementation calls " { $link short-section } "." } ;
HELP: indent-section?
{ $values { "section" section } { "?" boolean } }
M: section newline-after? drop f ;
+M: section long-section short-section ;
+
M: object short-section? section-fits? ;
: indent+ ( section n -- )
M: line-break short-section drop ;
-M: line-break long-section drop ;
-
! Block sections
TUPLE: block < section sections ;
M: text-section short-section string>> write ;
-M: text-section long-section short-section ;
-
: styled-text ( string style -- ) <text> add-section ;
: text ( string -- ) f styled-text ;
: <colon> ( -- block )
colon new-block ;
-M: colon long-section short-section ;
-
M: colon indent-section? drop t ;
M: colon unindent-first-line? drop t ;