?scan-token dup {
[ "{" = [ \ HELP{ ] [ f ] if ]
[ "syntax" lookup-word ]
- [ "help.markup" lookup-word ]
+ [ { [ "$" head? ] [ "help.markup" lookup-word ] } 1&& ]
[ dup ?last ":{[(/\"" member-eq? [ search ] [ drop f ] if ]
} 1|| {
{ [ dup not ] [ drop ] }
: trim-whitespace ( seq -- seq' )
dup rest-slice dup whitespace
- [ '[ _ short tail ] map! ] unless-zero drop
+ [ '[ _ index-or-length tail ] map! ] unless-zero drop
0 over [ [ blank? ] trim-head ] change-nth ;
: code-lines ( str -- seq )
: help-text? ( word -- ? )
{
- $description $snippet $emphasis $strong $url $heading
+ $description $snippet $emphasis $strong $heading
$subheading $syntax $class-description
$error-description $var-description $contract $notes
$curious $deprecated $errors $side-effects $content
} member-eq? ;
: help-code? ( word -- ? )
- { $example $unchecked-example $code } member-eq? ;
+ { $example $unchecked-example $code $url } member-eq? ;
: help-values? ( word -- ? )
{ $values $inputs $outputs } member-eq? ;