]> gitweb.factorcode.org Git - factor.git/commitdiff
help.markup: $values print None if ... none.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 21:31:35 +0000 (13:31 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 21:31:35 +0000 (13:31 -0800)
basis/help/markup/markup.factor

index f8d5d0a709e91369de79936a1d47221f6fcfa859..76616e74f9f10faf21f5ec199dbe66097005de38 100644 (file)
@@ -393,19 +393,18 @@ M: f ($instance) ($link) ;
     unclip \ $snippet swap present 2array
     swap dup first word? [ \ $instance prefix ] when 2array ;
 
-: $inputs ( element -- )
-    "Inputs" $heading
+: ($values) ( element -- )
     [ [ "None" write ] ($block) ]
     [ [ values-row ] map $table ] if-empty ;
 
+: $inputs ( element -- )
+    "Inputs" $heading ($values) ;
+
 : $outputs ( element -- )
-    "Outputs" $heading
-    [ [ "None" write ] ($block) ]
-    [ [ values-row ] map $table ] if-empty ;
+    "Outputs" $heading ($values) ;
 
 : $values ( element -- )
-    "Inputs and outputs" $heading
-    [ values-row ] map $table ;
+    "Inputs and outputs" $heading ($values) ;
 
 : $side-effects ( element -- )
     "Side effects" $heading "Modifies " print-element