]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/help/syntax/syntax.factor
help.syntax: treat $url differently
[factor.git] / basis / help / syntax / syntax.factor
index ba658aa3fb692f75e246e7a66234312744d0527a..3e6256acbb834dbcc534bf0980b727cde7e4fc9d 100644 (file)
@@ -17,7 +17,7 @@ DEFER: HELP{
     ?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 ] }
@@ -91,7 +91,7 @@ DEFER: HELP{
 
 : trim-whitespace ( seq -- seq' )
     dup rest-slice dup whitespace
-    [ '[ _ bound tail ] map! ] unless-zero drop
+    [ '[ _ index-or-length tail ] map! ] unless-zero drop
     0 over [ [ blank? ] trim-head ] change-nth ;
 
 : code-lines ( str -- seq )
@@ -113,7 +113,7 @@ DEFER: HELP{
 
 : 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
@@ -121,7 +121,7 @@ DEFER: HELP{
     } 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? ;